From 5958c9e366c05e6ee3d355c62ea0d022f047785d Mon Sep 17 00:00:00 2001 From: Michael Barton Date: Mon, 17 Jun 2013 07:21:12 +0000 Subject: [PATCH 01/42] major refactor of authentication code --- README | 45 ++++++++----- cloudfsapi.c | 185 +++++++++++++++++++++++++++++---------------------- cloudfsapi.h | 2 +- cloudfuse.c | 24 ++++--- 4 files changed, 148 insertions(+), 108 deletions(-) diff --git a/README b/README index 9563a36..5e30e17 100644 --- a/README +++ b/README @@ -35,20 +35,24 @@ BUILDING: USE: - Your Rackspace Cloud username and API key can be placed in a file - named $HOME/.cloudfuse: - username=[Account username] - api_key=[API key (or password for Keystone API)] - - The following settings are optional: - authurl=[Authentication url - connect to non-Rackspace Swift] - tenant=[Tenant for authentication with Keystone, enables Auth 2.0 API] - password=[Alias for api_key, if using Keystone API] + The following settings can be defined in the file ~/.cloudfuse: + username=[Account username for authentication, required] + api_key=[API key for authentication with Rackspace] + tenant=[Tenant for authentication with Openstack] + password=[Authentication password with Openstack] + authurl=[Authentication url, defaults to Rackspace's cloud] + region=[Regional endpoint to use] use_snet=[True to use Rackspace ServiceNet for connections] cache_timeout=[Seconds for directory caching, default 600] verify_ssl=[False to disable SSL cert verification] - These can also be specified as mount options on the command line: + For authenticating with Rackspace's cloud, at minimum "username" and + "api_key" must be set. + + For authenticating with Keystone, "username", "password", "tenant", and + "authurl" should probably be defined. + + These settings can also be specified as mount options on the command line: cloudfuse -o username=redbo,api_key=713aa... mountpoint/ Or as mount options in /etc/fstab: @@ -60,13 +64,22 @@ USE: EXAMPLE: - A typical .cloudfuse configuration file for use with OpenStack Essex: + A typical ~/.cloudfuse configuration file for use with Rackspace: + username=demo + api_key=643afce8b5187d40ba15e4827384fc5b + + # if no region is selected, it will use your default region. + # region=DFW + + # if connecting within a Rackspace datacenter, ServiceNet can be + # used to avoid bandwidth charges. + # use_snet=true - username=demo - tenant=demo - api_key=supersecret - authurl=http://10.10.0.1:5000/v2.0/tokens - use_openstack=true + A typical ~/.cloudfuse configuration file for use with OpenStack: + username=demo + tenant=demo + password=supersecret + authurl=http://10.10.0.1:5000/v2.0 BUGS/SHORTCOMINGS: diff --git a/cloudfsapi.c b/cloudfsapi.c index 2209595..583964d 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -13,6 +13,8 @@ #include #include #include +#include +#include #include "cloudfsapi.h" #include "config.h" @@ -82,14 +84,16 @@ static void return_connection(CURL *curl) pthread_mutex_unlock(&pool_mut); } -static void add_header(curl_slist **headers, const char *name, const char *value) +static void add_header(curl_slist **headers, const char *name, + const char *value) { char x_header[MAX_HEADER_SIZE]; snprintf(x_header, sizeof(x_header), "%s: %s", name, value); *headers = curl_slist_append(*headers, x_header); } -static int send_request(char *method, const char *path, FILE *fp, xmlParserCtxtPtr xmlctx, curl_slist *extra_headers) +static int send_request(char *method, const char *path, FILE *fp, + xmlParserCtxtPtr xmlctx, curl_slist *extra_headers) { char url[MAX_URL_SIZE]; char *slash; @@ -209,6 +213,7 @@ static size_t header_dispatch(void *ptr, size_t size, size_t nmemb, void *stream void cloudfs_init() { LIBXML_TEST_VERSION + xmlXPathInit(); curl_global_init(CURL_GLOBAL_ALL); pthread_mutex_init(&pool_mut, NULL); curl_version_info_data *cvid = curl_version_info(CURLVERSION_NOW); @@ -467,50 +472,68 @@ void cloudfs_verify_ssl(int vrfy) static struct { char username[MAX_HEADER_SIZE], password[MAX_HEADER_SIZE], - tenant[MAX_HEADER_SIZE], authurl[MAX_URL_SIZE], use_snet; + tenant[MAX_HEADER_SIZE], authurl[MAX_URL_SIZE], region[MAX_URL_SIZE], + use_snet, auth_version; } reconnect_args; -void cloudfs_set_credentials(char *username, char *tenant, char *password, char *authurl, int use_snet) +void cloudfs_set_credentials(char *username, char *tenant, char *password, + char *authurl, char *region, int use_snet) { strncpy(reconnect_args.username, username, sizeof(reconnect_args.username)); strncpy(reconnect_args.tenant, tenant, sizeof(reconnect_args.tenant)); strncpy(reconnect_args.password, password, sizeof(reconnect_args.password)); strncpy(reconnect_args.authurl, authurl, sizeof(reconnect_args.authurl)); + strncpy(reconnect_args.region, region, sizeof(reconnect_args.region)); + if (strstr(authurl, "v2.0")) + { + reconnect_args.auth_version = 2; + if (!strcmp(authurl + strlen(authurl) - 5, "/v2.0")) + strcat(reconnect_args.authurl, "/tokens"); + else if (!strcmp(authurl + strlen(authurl) - 6, "/v2.0/")) + strcat(reconnect_args.authurl, "tokens"); + } + else + reconnect_args.auth_version = 1; reconnect_args.use_snet = use_snet; } int cloudfs_connect() { long response = -1; - + curl_slist *headers = NULL; + CURL *curl = curl_easy_init(); + char postdata[8192] = ""; xmlNode *top_node = NULL, *service_node = NULL, *endpoint_node = NULL; xmlParserCtxtPtr xmlctx = NULL; - char *postdata; - if (reconnect_args.tenant[0]) - { - int count = asprintf(&postdata, - "" - "" - "" - "", - reconnect_args.tenant, reconnect_args.username, reconnect_args.password); - if (count < 0) - { - debugf("Unable to asprintf"); - abort(); - } - } - pthread_mutex_lock(&pool_mut); - debugf("Authenticating..."); + storage_token[0] = storage_url[0] = '\0'; - CURL *curl = curl_easy_init(); - - curl_slist *headers = NULL; - if (reconnect_args.tenant[0]) + if (reconnect_args.auth_version == 2) { + if (reconnect_args.username[0] && reconnect_args.tenant[0] && reconnect_args.password[0]) + { + snprintf(postdata, sizeof(postdata), "", reconnect_args.tenant, + reconnect_args.username, reconnect_args.password); + } + else if (reconnect_args.username[0] && reconnect_args.password[0]) + { + snprintf(postdata, sizeof(postdata), "", reconnect_args.username, reconnect_args.password); + } + else + { + debugf("Unable to determine auth scheme."); + abort(); + } + debugf("%s", postdata); + add_header(&headers, "Content-Type", "application/xml"); add_header(&headers, "Accept", "application/xml"); @@ -526,12 +549,12 @@ int cloudfs_connect() { add_header(&headers, "X-Auth-User", reconnect_args.username); add_header(&headers, "X-Auth-Key", reconnect_args.password); + curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, &header_dispatch); } curl_easy_setopt(curl, CURLOPT_VERBOSE, debug); curl_easy_setopt(curl, CURLOPT_URL, reconnect_args.authurl); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); - curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, &header_dispatch); curl_easy_setopt(curl, CURLOPT_USERAGENT, USER_AGENT); curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, verify_ssl); @@ -540,78 +563,78 @@ int cloudfs_connect() curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10); curl_easy_setopt(curl, CURLOPT_FORBID_REUSE, 1); + debugf("Sending authentication request."); curl_easy_perform(curl); curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response); curl_slist_free_all(headers); curl_easy_cleanup(curl); - if (reconnect_args.tenant[0]) + if (reconnect_args.auth_version == 2) { - free(postdata); xmlParseChunk(xmlctx, "", 0, 1); if (xmlctx->wellFormed && response >= 200 && response < 300) { - xmlNode *root_element = xmlDocGetRootElement(xmlctx->myDoc); - for (top_node = root_element->children; top_node; top_node = top_node->next) + xmlXPathContextPtr xpctx = xmlXPathNewContext(xmlctx->myDoc); + xmlXPathRegisterNs(xpctx, "id", "http://docs.openstack.org/identity/api/v2.0"); + xmlXPathObjectPtr obj; + + /* Determine default region if not configured */ + if (!reconnect_args.region[0]) { - if ((top_node->type == XML_ELEMENT_NODE) && - (!strcasecmp((const char *)top_node->name, "serviceCatalog"))) + obj = xmlXPathEval("/id:access/id:user", xpctx); + if (obj && obj->nodesetval && obj->nodesetval->nodeNr > 0) { - for (service_node = top_node->children; service_node; service_node = service_node->next) - if ((service_node->type == XML_ELEMENT_NODE) && - (!strcasecmp((const char *)service_node->name, "service"))) - { - xmlChar * serviceType = xmlGetProp(service_node, "type"); - int isObjectStore = serviceType && !strcasecmp(serviceType, "object-store"); - xmlFree(serviceType); - - if (!isObjectStore) continue; - - for (endpoint_node = service_node->children; endpoint_node; endpoint_node = endpoint_node->next) - if ((endpoint_node->type == XML_ELEMENT_NODE) && - (!strcasecmp((const char *)endpoint_node->name, "endpoint"))) - { - xmlChar * publicURL = xmlGetProp(endpoint_node, "publicURL"); - if (publicURL) - { - char copy = 1; - if (storage_url[0]) - { - if (strstr(publicURL, "cdn")) - { - copy = 0; - debugf("Warning - found multiple object-store services; keeping %s, ignoring %s", - storage_url, publicURL); - } - else - debugf("Warning - found multiple object-store services; using %s instead of %s", - publicURL, storage_url); - } - if (copy) - strncpy(storage_url, publicURL, sizeof(storage_url)); - } - xmlFree(publicURL); - } - } - } - - if ((top_node->type == XML_ELEMENT_NODE) && - (!strcasecmp((const char *)top_node->name, "token"))) - { - xmlChar * tokenId = xmlGetProp(top_node, "id"); - if (tokenId) + xmlChar *default_region = xmlGetProp(obj->nodesetval->nodeTab[0], "defaultRegion"); + if (default_region && *default_region) { - if (storage_token[0]) - debugf("Warning - found multiple authentication tokens."); - strncpy(storage_token, tokenId, sizeof(storage_token)); + strncpy(reconnect_args.region, default_region, sizeof(reconnect_args.region)); + xmlFree(default_region); } - xmlFree(tokenId); } + xmlXPathFreeNodeSetList(obj); } + debugf("Using region: %s", reconnect_args.region); + + if (reconnect_args.region[0]) + { + char path[1024]; + snprintf(path, sizeof(path), "/id:access/id:serviceCatalog/id:service" + "[@type='object-store']/id:endpoint[@region='%s']", + reconnect_args.region); + obj = xmlXPathEval(path, xpctx); + } + else + obj = xmlXPathEval("/id:access/id:serviceCatalog/id:service" + "[@type='object-store']/id:endpoint", xpctx); + if (obj->nodesetval && obj->nodesetval->nodeNr > 0) + { + xmlChar *url; + if (reconnect_args.use_snet) + url = xmlGetProp(obj->nodesetval->nodeTab[0], "internalURL"); + else + url = xmlGetProp(obj->nodesetval->nodeTab[0], "publicURL"); + strncpy(storage_url, url, sizeof(storage_url)); + xmlFree(url); + } + else + debugf("Unable to find endpoint"); + xmlXPathFreeNodeSetList(obj); + + obj = xmlXPathEval("/id:access/id:token", xpctx); + if (obj->nodesetval && obj->nodesetval->nodeNr > 0) + { + xmlChar *token_id = xmlGetProp(obj->nodesetval->nodeTab[0], "id"); + strncpy(storage_token, token_id, sizeof(storage_token)); + xmlFree(token_id); + } + xmlXPathFreeNodeSetList(obj); + xmlXPathFreeContext(xpctx); + debugf("storage_url: %s", storage_url); + debugf("storage_token: %s", storage_token); } xmlFreeParserCtxt(xmlctx); } - if (reconnect_args.use_snet && storage_url[0]) + else if (reconnect_args.use_snet && storage_url[0]) rewrite_url_snet(storage_url); pthread_mutex_unlock(&pool_mut); return (response >= 200 && response < 300 && storage_token[0] && storage_url[0]); diff --git a/cloudfsapi.h b/cloudfsapi.h index 0dfad3a..5e2facf 100644 --- a/cloudfsapi.h +++ b/cloudfsapi.h @@ -25,7 +25,7 @@ typedef struct dir_entry void cloudfs_init(); void cloudfs_set_credentials(char *username, char *tenant, char *password, - char *authurl, int snet_rewrite); + char *authurl, char *region, int use_snet); int cloufds_connect(); int cloudfs_object_read_fp(const char *path, FILE *fp); int cloudfs_object_write_fp(const char *path, FILE *fp); diff --git a/cloudfuse.c b/cloudfuse.c index ca58c31..cd99528 100644 --- a/cloudfuse.c +++ b/cloudfuse.c @@ -427,17 +427,19 @@ char *get_home_dir() static struct options { char username[OPTION_SIZE]; char tenant[OPTION_SIZE]; - char api_key[OPTION_SIZE]; + char password[OPTION_SIZE]; char cache_timeout[OPTION_SIZE]; char authurl[OPTION_SIZE]; + char region[OPTION_SIZE]; char use_snet[OPTION_SIZE]; char verify_ssl[OPTION_SIZE]; } options = { .username = "", - .api_key = "", + .password = "", .tenant = "", .cache_timeout = "600", - .authurl = "https://auth.api.rackspacecloud.com/v1.0", + .authurl = "https://identity.api.rackspacecloud.com/v2.0/", + .region = "", .use_snet = "false", .verify_ssl = "true", }; @@ -446,10 +448,11 @@ int parse_option(void *data, const char *arg, int key, struct fuse_args *outargs { if (sscanf(arg, " username = %[^\r\n ]", options.username) || sscanf(arg, " tenant = %[^\r\n ]", options.tenant) || - sscanf(arg, " api_key = %[^\r\n ]", options.api_key) || - sscanf(arg, " password = %[^\r\n ]", options.api_key) || + sscanf(arg, " api_key = %[^\r\n ]", options.password) || + sscanf(arg, " password = %[^\r\n ]", options.password) || sscanf(arg, " cache_timeout = %[^\r\n ]", options.cache_timeout) || sscanf(arg, " authurl = %[^\r\n ]", options.authurl) || + sscanf(arg, " region = %[^\r\n ]", options.region) || sscanf(arg, " use_snet = %[^\r\n ]", options.use_snet) || sscanf(arg, " verify_ssl = %[^\r\n ]", options.verify_ssl)) return 0; @@ -477,7 +480,7 @@ int main(int argc, char **argv) cache_timeout = atoi(options.cache_timeout); - if (!*options.username || !*options.api_key) + if (!*options.username || !*options.password) { fprintf(stderr, "Unable to determine username and API key.\n\n"); fprintf(stderr, "These can be set either as mount options or in" @@ -486,8 +489,8 @@ int main(int argc, char **argv) fprintf(stderr, " api_key=[API key (or password for Keystone API)]\n\n"); fprintf(stderr, "The following settings are optional:\n\n"); fprintf(stderr, " authurl=[Authentication url - connect to non-Rackspace Swift]\n"); - fprintf(stderr, " tenant=[Tenant for authentication with Keystone, enables Auth 2.0 API]\n"); - fprintf(stderr, " password=[Alias for api_key, if using Keystone API]\n"); + fprintf(stderr, " tenant=[Tenant for authentication with Keystone]\n"); + fprintf(stderr, " password=[Password for authentication with Keystone]\n"); fprintf(stderr, " use_snet=[True to use Rackspace ServiceNet for connections]\n"); fprintf(stderr, " cache_timeout=[Seconds for directory caching, default 600]\n"); fprintf(stderr, " verify_ssl=[False to disable SSL cert verification]\n"); @@ -499,8 +502,9 @@ int main(int argc, char **argv) cloudfs_verify_ssl(!strcasecmp(options.verify_ssl, "true")); - cloudfs_set_credentials(options.username, options.tenant, options.api_key, - options.authurl, !strcasecmp(options.use_snet, "true")); + cloudfs_set_credentials(options.username, options.tenant, options.password, + options.authurl, options.region, + !strcasecmp(options.use_snet, "true")); if (!cloudfs_connect()) { fprintf(stderr, "Failed to authenticate.\n"); From 0a51180973ee825defa557a40c343c2b40f83b04 Mon Sep 17 00:00:00 2001 From: Michael Barton Date: Mon, 17 Jun 2013 07:23:02 +0000 Subject: [PATCH 02/42] increase header size for PKI tokens --- cloudfsapi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudfsapi.h b/cloudfsapi.h index 5e2facf..b816640 100644 --- a/cloudfsapi.h +++ b/cloudfsapi.h @@ -5,7 +5,7 @@ #include #define BUFFER_INITIAL_SIZE 4096 -#define MAX_HEADER_SIZE 4096 +#define MAX_HEADER_SIZE 8192 #define MAX_PATH_SIZE (1024 + 256 + 3) #define MAX_URL_SIZE (MAX_PATH_SIZE * 3) #define USER_AGENT "CloudFuse" From 09b1f82d011b58e1b8e4fa0c7accbb8550e1c68b Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Thu, 12 Dec 2013 17:20:05 -0600 Subject: [PATCH 03/42] added symlinks --- cloudfsapi.c | 24 ++++++++++++++++++ cloudfsapi.h | 2 ++ cloudfuse.c | 72 +++++++++++++++++++++++++++++++++++++++++++++------- 3 files changed, 89 insertions(+), 9 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 583964d..84405cd 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -137,6 +137,15 @@ static int send_request(char *method, const char *path, FILE *fp, curl_easy_setopt(curl, CURLOPT_INFILESIZE, 0); add_header(&headers, "Content-Type", "application/directory"); } + else if (!strcasecmp(method, "MKLINK") && fp) + { + rewind(fp); + curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); + //curl_easy_setopt(curl, CURLOPT_INFILESIZE, 0); + curl_easy_setopt(curl, CURLOPT_INFILESIZE, cloudfs_file_size(fileno(fp))); + curl_easy_setopt(curl, CURLOPT_READDATA, fp); + add_header(&headers, "Content-Type", "application/link"); + } else if (!strcasecmp(method, "PUT") && fp) { rewind(fp); @@ -385,6 +394,8 @@ int cloudfs_list_directory(const char *path, dir_entry **dir_list) de->isdir = de->content_type && ((strstr(de->content_type, "application/folder") != NULL) || (strstr(de->content_type, "application/directory") != NULL)); + de->islink = de->content_type && + ((strstr(de->content_type, "application/link") != NULL)); if (de->isdir) { if (!strncasecmp(de->name, last_subdir, sizeof(last_subdir))) @@ -445,6 +456,19 @@ int cloudfs_copy_object(const char *src, const char *dst) return (response >= 200 && response < 300); } +int cloudfs_create_symlink(const char *src, const char *dst) +{ + char *dst_encoded = curl_escape(dst, 0); + + FILE *lnk = tmpfile(); + fwrite(src, strlen(src), 1, lnk); + fwrite("\0", 1, 1, lnk); + int response = send_request("MKLINK", dst_encoded, lnk, NULL, NULL); + curl_free(dst_encoded); + fclose(lnk); + return (response >= 200 && response < 300); +} + int cloudfs_create_directory(const char *path) { char *encoded = curl_escape(path, 0); diff --git a/cloudfsapi.h b/cloudfsapi.h index b816640..5c5bdc8 100644 --- a/cloudfsapi.h +++ b/cloudfsapi.h @@ -20,6 +20,7 @@ typedef struct dir_entry off_t size; time_t last_modified; int isdir; + int islink; struct dir_entry *next; } dir_entry; @@ -32,6 +33,7 @@ int cloudfs_object_write_fp(const char *path, FILE *fp); int cloudfs_list_directory(const char *path, dir_entry **); int cloudfs_delete_object(const char *path); int cloudfs_copy_object(const char *src, const char *dst); +int cloudfs_create_symlink(const char *src, const char *dst); int cloudfs_create_directory(const char *label); int cloudfs_object_truncate(const char *path, off_t size); off_t cloudfs_file_size(int fd); diff --git a/cloudfuse.c b/cloudfuse.c index cd99528..aa3679c 100644 --- a/cloudfuse.c +++ b/cloudfuse.c @@ -89,7 +89,7 @@ static int caching_list_directory(const char *path, dir_entry **list) return 1; } -static void update_dir_cache(const char *path, off_t size, int isdir) +static void update_dir_cache(const char *path, off_t size, int isdir, int islink) { pthread_mutex_lock(&dmut); dir_cache *cw; @@ -112,9 +112,23 @@ static void update_dir_cache(const char *path, off_t size, int isdir) de = (dir_entry *)malloc(sizeof(dir_entry)); de->size = size; de->isdir = isdir; + de->islink = islink; de->name = strdup(&path[strlen(cw->path)+1]); de->full_name = strdup(path); - de->content_type = strdup(isdir ? "application/directory" : "application/octet-stream"); + + if (isdir) + { + de->content_type = strdup("application/link"); + } + if(islink) + { + de->content_type = strdup("application/directory"); + } + else + { + + de->content_type = strdup("application/octet-stream"); + } de->last_modified = time(NULL); de->next = cw->entries; cw->entries = de; @@ -207,6 +221,15 @@ static int cfs_getattr(const char *path, struct stat *stbuf) stbuf->st_mode = S_IFDIR | 0755; stbuf->st_nlink = 2; } + else if (de->islink) + { + stbuf->st_size = 1; + stbuf->st_mode = S_IFLNK | 0755; + stbuf->st_nlink = 1; + stbuf->st_size = de->size; + /* calc. blocks as if 4K blocksize filesystem; stat uses units of 512B */ + stbuf->st_blocks = ((4095 + de->size) / 4096) * 8; + } else { stbuf->st_size = de->size; @@ -247,7 +270,7 @@ static int cfs_mkdir(const char *path, mode_t mode) { if (cloudfs_create_directory(path)) { - update_dir_cache(path, 0, 1); + update_dir_cache(path, 0, 1, 0); return 0; } return -ENOENT; @@ -261,7 +284,7 @@ static int cfs_create(const char *path, mode_t mode, struct fuse_file_info *info fclose(temp_file); of->flags = info->flags; info->fh = (uintptr_t)of; - update_dir_cache(path, 0, 0); + update_dir_cache(path, 0, 0, 0); info->direct_io = 1; return 0; } @@ -277,7 +300,7 @@ static int cfs_open(const char *path, struct fuse_file_info *info) fclose(temp_file); return -ENOENT; } - update_dir_cache(path, (de ? de->size : 0), 0); + update_dir_cache(path, (de ? de->size : 0), 0, 0); } openfile *of = (openfile *)malloc(sizeof(openfile)); of->fd = dup(fileno(temp_file)); @@ -298,7 +321,7 @@ static int cfs_flush(const char *path, struct fuse_file_info *info) openfile *of = (openfile *)(uintptr_t)info->fh; if (of) { - update_dir_cache(path, cloudfs_file_size(of->fd), 0); + update_dir_cache(path, cloudfs_file_size(of->fd), 0, 0); if (of->flags & O_RDWR || of->flags & O_WRONLY) { FILE *fp = fdopen(dup(of->fd), "r"); @@ -336,13 +359,13 @@ static int cfs_ftruncate(const char *path, off_t size, struct fuse_file_info *in if (ftruncate(of->fd, size)) return -errno; lseek(of->fd, 0, SEEK_SET); - update_dir_cache(path, size, 0); + update_dir_cache(path, size, 0, 0); return 0; } static int cfs_write(const char *path, const char *buf, size_t length, off_t offset, struct fuse_file_info *info) { - update_dir_cache(path, offset + length, 0); + update_dir_cache(path, offset + length, 0, 0); return pwrite(((openfile *)(uintptr_t)info->fh)->fd, buf, length, offset); } @@ -401,12 +424,41 @@ static int cfs_rename(const char *src, const char *dst) if (cloudfs_copy_object(src, dst)) { /* FIXME this isn't quite right as doesn't preserve last modified */ - update_dir_cache(dst, src_de->size, 0); + update_dir_cache(dst, src_de->size, 0, 0); return cfs_unlink(src); } return -EIO; } +static int cfs_symlink(const char *src, const char *dst) +{ + if(cloudfs_create_symlink(src, dst)) + { + update_dir_cache(dst, 1, 0, 1); + return 0; + } + return -EIO; +} + +static int cfs_readlink(const char* path, char* buf, size_t size) +{ + FILE *temp_file = tmpfile(); + int ret = 0; + + if (!cloudfs_object_write_fp(path, temp_file)) + { + ret = -ENOENT; + } + + if (!pread(fileno(temp_file), buf, size, 0)) + { + ret = -ENOENT; + } + + fclose(temp_file); + return ret; +} + static void *cfs_init(struct fuse_conn_info *conn) { signal(SIGPIPE, SIG_IGN); @@ -536,6 +588,8 @@ int main(int argc, char **argv) .chmod = cfs_chmod, .chown = cfs_chown, .rename = cfs_rename, + .symlink = cfs_symlink, + .readlink = cfs_readlink, .init = cfs_init, }; From b54ec26ed13fb591fe354ccae5f3e051847035e5 Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Sat, 21 Dec 2013 00:49:32 -0600 Subject: [PATCH 04/42] dto works. need to multithread and test more --- cloudfsapi.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 80 insertions(+), 5 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 84405cd..fcb764a 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -31,6 +31,8 @@ static int curl_pool_count = 0; static int debug = 0; static int verify_ssl = 1; static int rhel5_mode = 0; +static long segment_size = 1073741824; +static long segment_above = 2147483648; #ifdef HAVE_OPENSSL #include @@ -92,8 +94,9 @@ static void add_header(curl_slist **headers, const char *name, *headers = curl_slist_append(*headers, x_header); } -static int send_request(char *method, const char *path, FILE *fp, - xmlParserCtxtPtr xmlctx, curl_slist *extra_headers) +static int send_request_size(char *method, const char *path, FILE *fp, + xmlParserCtxtPtr xmlctx, curl_slist *extra_headers, + off_t file_size) { char url[MAX_URL_SIZE]; char *slash; @@ -142,15 +145,16 @@ static int send_request(char *method, const char *path, FILE *fp, rewind(fp); curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); //curl_easy_setopt(curl, CURLOPT_INFILESIZE, 0); - curl_easy_setopt(curl, CURLOPT_INFILESIZE, cloudfs_file_size(fileno(fp))); + curl_easy_setopt(curl, CURLOPT_INFILESIZE, file_size); curl_easy_setopt(curl, CURLOPT_READDATA, fp); add_header(&headers, "Content-Type", "application/link"); } else if (!strcasecmp(method, "PUT") && fp) { - rewind(fp); + // your zealotry will destroy us all! + //rewind(fp); curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); - curl_easy_setopt(curl, CURLOPT_INFILESIZE, cloudfs_file_size(fileno(fp))); + curl_easy_setopt(curl, CURLOPT_INFILESIZE, file_size); curl_easy_setopt(curl, CURLOPT_READDATA, fp); } else if (!strcasecmp(method, "GET")) @@ -198,6 +202,18 @@ static int send_request(char *method, const char *path, FILE *fp, return response; } +static int send_request(char *method, const char *path, FILE *fp, + xmlParserCtxtPtr xmlctx, curl_slist *extra_headers) +{ + + long flen = 0; + if (fp) + flen = cloudfs_file_size(fileno(fp)); + + return send_request_size(method, path, fp, xmlctx, extra_headers, flen); + +} + static size_t header_dispatch(void *ptr, size_t size, size_t nmemb, void *stream) { char *header = (char *)alloca(size * nmemb + 1); @@ -255,7 +271,66 @@ void cloudfs_init() int cloudfs_object_read_fp(const char *path, FILE *fp) { + + long flen; fflush(fp); + + // determine the size of the file and segment if it is above the threshhold + fseek(fp, 0, SEEK_END); + flen = ftell(fp); + if (flen >= segment_above) { + int i; + long remaining = flen % segment_size; + int full_segments = flen / segment_size; + + char manifest[MAX_URL_SIZE]; + char *meta_mtime = "1386971541.005863"; + + char seg_base[MAX_URL_SIZE]; + char seg_path[MAX_URL_SIZE]; + int response; + + char *string = strdup(path); + + sprintf(seg_base, "/%s", strsep(&string, "/")); + char *container = strsep(&string, "/"); + char *object = strsep(&string, "/"); + sprintf(manifest, "%s_segments/%s/%s/%ld/%ld/", container, object, + meta_mtime, flen, segment_size); + + sprintf(seg_base, "%s/%s", seg_base, manifest); + free(string); + + for (i = 0; i < full_segments; i++) { + fseek(fp, i * segment_size, SEEK_SET); + sprintf(seg_path, "%s%08i", seg_base, i); + char *encoded = curl_escape(seg_path, 0); + response = send_request_size("PUT", encoded, fp, NULL, NULL, segment_size); + curl_free(encoded); + } + + if (remaining) { + + fseek(fp, remaining, SEEK_END); + sprintf(seg_path, "%s%08i", seg_base, full_segments); + char *encoded = curl_escape(seg_path, 0); + response = send_request_size("PUT", encoded, fp, NULL, NULL, remaining); + curl_free(encoded); + } + + char *encoded = curl_escape(path, 0); + curl_slist *headers = NULL; + add_header(&headers, "x-object-manifest", manifest); + add_header(&headers, "x-object-meta-mtime", meta_mtime); + add_header(&headers, "Content-Length", "0"); + response = send_request_size("PUT", encoded, NULL, NULL, headers, 0); + curl_slist_free_all(headers); + + curl_free(encoded); + return (response >= 200 && response < 300); + + } + rewind(fp); char *encoded = curl_escape(path, 0); int response = send_request("PUT", encoded, fp, NULL, NULL); From c1246631ee52c06e10c754cdd8a6a571ff21b84a Mon Sep 17 00:00:00 2001 From: matt Date: Sat, 21 Dec 2013 01:10:33 -0600 Subject: [PATCH 05/42] remainder wouldn't upload --- cloudfsapi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index fcb764a..e52c22c 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -311,7 +311,9 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) if (remaining) { - fseek(fp, remaining, SEEK_END); + //fseek(fp, remaining, SEEK_END); + // this won't work multithreaded + fseek(fp, i * segment_size, SEEK_SET); sprintf(seg_path, "%s%08i", seg_base, full_segments); char *encoded = curl_escape(seg_path, 0); response = send_request_size("PUT", encoded, fp, NULL, NULL, remaining); From ccd48e13ac78de4853277a1697384df7b373eca3 Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Sat, 21 Dec 2013 01:37:13 -0600 Subject: [PATCH 06/42] remainder wouldn't upload --- cloudfsapi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index fcb764a..e52c22c 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -311,7 +311,9 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) if (remaining) { - fseek(fp, remaining, SEEK_END); + //fseek(fp, remaining, SEEK_END); + // this won't work multithreaded + fseek(fp, i * segment_size, SEEK_SET); sprintf(seg_path, "%s%08i", seg_base, full_segments); char *encoded = curl_escape(seg_path, 0); response = send_request_size("PUT", encoded, fp, NULL, NULL, remaining); From 0e89aec778e078b3310ade2718dc21906b92a83a Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Sat, 21 Dec 2013 10:57:02 -0600 Subject: [PATCH 07/42] multithreaded dto support --- cloudfsapi.c | 58 +++++++++++++++++++++++++++++++++++++++------------- cloudfsapi.h | 8 ++++++++ 2 files changed, 52 insertions(+), 14 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index e52c22c..70ebfd3 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -32,7 +32,9 @@ static int debug = 0; static int verify_ssl = 1; static int rhel5_mode = 0; static long segment_size = 1073741824; +//static long segment_size = 1; static long segment_above = 2147483648; +//static long segment_above = 1; #ifdef HAVE_OPENSSL #include @@ -269,6 +271,21 @@ void cloudfs_init() } } +void *upload_segment(void *seginfo) +{ + char seg_path[MAX_URL_SIZE]; + struct segment_info *info; + info = (struct segment_info *)seginfo; + + fseek(info->fp, info->part * segment_size, SEEK_SET); + + sprintf(seg_path, "%s%08i", info->seg_base, info->part); + char *encoded = curl_escape(seg_path, 0); + int response = send_request_size("PUT", encoded, info->fp, NULL, NULL, info->size); + curl_free(encoded); + pthread_exit(NULL); +} + int cloudfs_object_read_fp(const char *path, FILE *fp) { @@ -287,7 +304,7 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) char *meta_mtime = "1386971541.005863"; char seg_base[MAX_URL_SIZE]; - char seg_path[MAX_URL_SIZE]; + char file_path[PATH_MAX]; int response; char *string = strdup(path); @@ -301,25 +318,38 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) sprintf(seg_base, "%s/%s", seg_base, manifest); free(string); + struct segment_info *info = (struct segment_info *) + malloc(full_segments * sizeof(struct segment_info)); + + pthread_t *threads = (pthread_t *)malloc(full_segments * sizeof(pthread_t)); + sprintf(file_path, "/proc/self/fd/%d", fileno(fp)); + for (i = 0; i < full_segments; i++) { - fseek(fp, i * segment_size, SEEK_SET); - sprintf(seg_path, "%s%08i", seg_base, i); - char *encoded = curl_escape(seg_path, 0); - response = send_request_size("PUT", encoded, fp, NULL, NULL, segment_size); - curl_free(encoded); + info[i].fp = fopen(file_path, "r"); + info[i].part = i; + info[i].size = segment_size; + info[i].seg_base = seg_base; + pthread_create(&threads[i], NULL, upload_segment, (void *)&(info[i])); } if (remaining) { - - //fseek(fp, remaining, SEEK_END); - // this won't work multithreaded - fseek(fp, i * segment_size, SEEK_SET); - sprintf(seg_path, "%s%08i", seg_base, full_segments); - char *encoded = curl_escape(seg_path, 0); - response = send_request_size("PUT", encoded, fp, NULL, NULL, remaining); - curl_free(encoded); + info[i].fp = fopen(file_path, "r"); + info[i].part = i; + info[i].size = remaining; + info[i].seg_base = seg_base; + pthread_create(&threads[i], NULL, upload_segment, (void *)&(info[i])); + pthread_join(threads[i], NULL); + fclose(info[i].fp); } + for (i = 0; i < full_segments; i++) { + pthread_join(threads[i], NULL); + fclose(info[i].fp); + } + + free(info); + free(threads); + char *encoded = curl_escape(path, 0); curl_slist *headers = NULL; add_header(&headers, "x-object-manifest", manifest); diff --git a/cloudfsapi.h b/cloudfsapi.h index 5c5bdc8..54c403a 100644 --- a/cloudfsapi.h +++ b/cloudfsapi.h @@ -24,6 +24,14 @@ typedef struct dir_entry struct dir_entry *next; } dir_entry; +struct segment_info +{ + FILE *fp; + int part; + long size; + char *seg_base; +}; + void cloudfs_init(); void cloudfs_set_credentials(char *username, char *tenant, char *password, char *authurl, char *region, int use_snet); From 7083c848baba8d844d6c57cec80f8b3162503fcd Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Sat, 21 Dec 2013 11:09:25 -0600 Subject: [PATCH 08/42] was borken --- cloudfsapi.c | 56 ++++++++++++---------------------------------------- cloudfsapi.h | 8 -------- 2 files changed, 13 insertions(+), 51 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 70ebfd3..e52c22c 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -32,9 +32,7 @@ static int debug = 0; static int verify_ssl = 1; static int rhel5_mode = 0; static long segment_size = 1073741824; -//static long segment_size = 1; static long segment_above = 2147483648; -//static long segment_above = 1; #ifdef HAVE_OPENSSL #include @@ -271,21 +269,6 @@ void cloudfs_init() } } -void *upload_segment(void *seginfo) -{ - char seg_path[MAX_URL_SIZE]; - struct segment_info *info; - info = (struct segment_info *)seginfo; - - fseek(info->fp, info->part * segment_size, SEEK_SET); - - sprintf(seg_path, "%s%08i", info->seg_base, info->part); - char *encoded = curl_escape(seg_path, 0); - int response = send_request_size("PUT", encoded, info->fp, NULL, NULL, info->size); - curl_free(encoded); - pthread_exit(NULL); -} - int cloudfs_object_read_fp(const char *path, FILE *fp) { @@ -304,7 +287,7 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) char *meta_mtime = "1386971541.005863"; char seg_base[MAX_URL_SIZE]; - char file_path[PATH_MAX]; + char seg_path[MAX_URL_SIZE]; int response; char *string = strdup(path); @@ -318,38 +301,25 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) sprintf(seg_base, "%s/%s", seg_base, manifest); free(string); - struct segment_info *info = (struct segment_info *) - malloc(full_segments * sizeof(struct segment_info)); - - pthread_t *threads = (pthread_t *)malloc(full_segments * sizeof(pthread_t)); - sprintf(file_path, "/proc/self/fd/%d", fileno(fp)); - for (i = 0; i < full_segments; i++) { - info[i].fp = fopen(file_path, "r"); - info[i].part = i; - info[i].size = segment_size; - info[i].seg_base = seg_base; - pthread_create(&threads[i], NULL, upload_segment, (void *)&(info[i])); + fseek(fp, i * segment_size, SEEK_SET); + sprintf(seg_path, "%s%08i", seg_base, i); + char *encoded = curl_escape(seg_path, 0); + response = send_request_size("PUT", encoded, fp, NULL, NULL, segment_size); + curl_free(encoded); } if (remaining) { - info[i].fp = fopen(file_path, "r"); - info[i].part = i; - info[i].size = remaining; - info[i].seg_base = seg_base; - pthread_create(&threads[i], NULL, upload_segment, (void *)&(info[i])); - pthread_join(threads[i], NULL); - fclose(info[i].fp); - } - for (i = 0; i < full_segments; i++) { - pthread_join(threads[i], NULL); - fclose(info[i].fp); + //fseek(fp, remaining, SEEK_END); + // this won't work multithreaded + fseek(fp, i * segment_size, SEEK_SET); + sprintf(seg_path, "%s%08i", seg_base, full_segments); + char *encoded = curl_escape(seg_path, 0); + response = send_request_size("PUT", encoded, fp, NULL, NULL, remaining); + curl_free(encoded); } - free(info); - free(threads); - char *encoded = curl_escape(path, 0); curl_slist *headers = NULL; add_header(&headers, "x-object-manifest", manifest); diff --git a/cloudfsapi.h b/cloudfsapi.h index 54c403a..5c5bdc8 100644 --- a/cloudfsapi.h +++ b/cloudfsapi.h @@ -24,14 +24,6 @@ typedef struct dir_entry struct dir_entry *next; } dir_entry; -struct segment_info -{ - FILE *fp; - int part; - long size; - char *seg_base; -}; - void cloudfs_init(); void cloudfs_set_credentials(char *username, char *tenant, char *password, char *authurl, char *region, int use_snet); From 16da0d530e9f7553ad3c9261583cacc68afe80d9 Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Sat, 21 Dec 2013 19:44:46 -0600 Subject: [PATCH 09/42] dto threaded works --- cloudfsapi.c | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 70ebfd3..3136bab 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -32,9 +32,9 @@ static int debug = 0; static int verify_ssl = 1; static int rhel5_mode = 0; static long segment_size = 1073741824; -//static long segment_size = 1; +//static long segment_size = 4; static long segment_above = 2147483648; -//static long segment_above = 1; +//static long segment_above = 2; #ifdef HAVE_OPENSSL #include @@ -96,6 +96,14 @@ static void add_header(curl_slist **headers, const char *name, *headers = curl_slist_append(*headers, x_header); } +static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) +{ + if (size * nmemb < 1) + return 0; + fprintf(stderr, "fp %d nmemb %d size %d \n\n", (FILE *)userp, nmemb, size); + return fread(ptr, 1, size, (FILE *)userp); +} + static int send_request_size(char *method, const char *path, FILE *fp, xmlParserCtxtPtr xmlctx, curl_slist *extra_headers, off_t file_size) @@ -157,7 +165,9 @@ static int send_request_size(char *method, const char *path, FILE *fp, //rewind(fp); curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); curl_easy_setopt(curl, CURLOPT_INFILESIZE, file_size); + //curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); curl_easy_setopt(curl, CURLOPT_READDATA, fp); + fprintf(stderr, "\n\nthe file size is %d and the fp is %d\n\n", file_size, fp); } else if (!strcasecmp(method, "GET")) { @@ -271,6 +281,8 @@ void cloudfs_init() } } + + void *upload_segment(void *seginfo) { char seg_path[MAX_URL_SIZE]; @@ -278,11 +290,13 @@ void *upload_segment(void *seginfo) info = (struct segment_info *)seginfo; fseek(info->fp, info->part * segment_size, SEEK_SET); + fprintf(stderr, "now %d is at %d\n\n", info->fp, ftell(info->fp)); sprintf(seg_path, "%s%08i", info->seg_base, info->part); char *encoded = curl_escape(seg_path, 0); int response = send_request_size("PUT", encoded, info->fp, NULL, NULL, info->size); curl_free(encoded); + fclose(info->fp); pthread_exit(NULL); } @@ -299,6 +313,7 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) int i; long remaining = flen % segment_size; int full_segments = flen / segment_size; + int segments = full_segments + (remaining > 0); char manifest[MAX_URL_SIZE]; char *meta_mtime = "1386971541.005863"; @@ -309,7 +324,7 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) char *string = strdup(path); - sprintf(seg_base, "/%s", strsep(&string, "/")); + sprintf(seg_base, "%s", strsep(&string, "/")); char *container = strsep(&string, "/"); char *object = strsep(&string, "/"); sprintf(manifest, "%s_segments/%s/%s/%ld/%ld/", container, object, @@ -319,32 +334,23 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) free(string); struct segment_info *info = (struct segment_info *) - malloc(full_segments * sizeof(struct segment_info)); + malloc(segments * sizeof(struct segment_info)); - pthread_t *threads = (pthread_t *)malloc(full_segments * sizeof(pthread_t)); + pthread_t *threads = (pthread_t *)malloc(segments * sizeof(pthread_t)); sprintf(file_path, "/proc/self/fd/%d", fileno(fp)); - for (i = 0; i < full_segments; i++) { + for (i = 0; i < segments; i++) { info[i].fp = fopen(file_path, "r"); info[i].part = i; - info[i].size = segment_size; + info[i].size = i < full_segments ? segment_size : remaining; info[i].seg_base = seg_base; + fprintf(stderr, "i %d full_segments %d size %ld seg_base %s \n\n", i, full_segments, info[i].size, seg_base ); + fprintf(stderr, "fp %d \n\n", info[i].fp); pthread_create(&threads[i], NULL, upload_segment, (void *)&(info[i])); } - if (remaining) { - info[i].fp = fopen(file_path, "r"); - info[i].part = i; - info[i].size = remaining; - info[i].seg_base = seg_base; - pthread_create(&threads[i], NULL, upload_segment, (void *)&(info[i])); + for (i = 0; i < segments; i++) { pthread_join(threads[i], NULL); - fclose(info[i].fp); - } - - for (i = 0; i < full_segments; i++) { - pthread_join(threads[i], NULL); - fclose(info[i].fp); } free(info); From 025e48966047fb2288887ef8e94851f447a5becb Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Sat, 21 Dec 2013 19:58:58 -0600 Subject: [PATCH 10/42] cleaned up --- cloudfsapi.c | 53 +++++++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 3136bab..45cec02 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -96,14 +96,6 @@ static void add_header(curl_slist **headers, const char *name, *headers = curl_slist_append(*headers, x_header); } -static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) -{ - if (size * nmemb < 1) - return 0; - fprintf(stderr, "fp %d nmemb %d size %d \n\n", (FILE *)userp, nmemb, size); - return fread(ptr, 1, size, (FILE *)userp); -} - static int send_request_size(char *method, const char *path, FILE *fp, xmlParserCtxtPtr xmlctx, curl_slist *extra_headers, off_t file_size) @@ -165,9 +157,7 @@ static int send_request_size(char *method, const char *path, FILE *fp, //rewind(fp); curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); curl_easy_setopt(curl, CURLOPT_INFILESIZE, file_size); - //curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); curl_easy_setopt(curl, CURLOPT_READDATA, fp); - fprintf(stderr, "\n\nthe file size is %d and the fp is %d\n\n", file_size, fp); } else if (!strcasecmp(method, "GET")) { @@ -281,8 +271,6 @@ void cloudfs_init() } } - - void *upload_segment(void *seginfo) { char seg_path[MAX_URL_SIZE]; @@ -290,11 +278,16 @@ void *upload_segment(void *seginfo) info = (struct segment_info *)seginfo; fseek(info->fp, info->part * segment_size, SEEK_SET); - fprintf(stderr, "now %d is at %d\n\n", info->fp, ftell(info->fp)); - sprintf(seg_path, "%s%08i", info->seg_base, info->part); + snprintf(seg_path, MAX_URL_SIZE, "%s%08i", info->seg_base, info->part); char *encoded = curl_escape(seg_path, 0); - int response = send_request_size("PUT", encoded, info->fp, NULL, NULL, info->size); + int response = send_request_size("PUT", encoded, info->fp, NULL, NULL, + info->size); + + if (!(response >= 200 && response < 300)) + fprintf(stderr, "Segment upload %s failed with response %d", seg_path, + response); + curl_free(encoded); fclose(info->fp); pthread_exit(NULL); @@ -316,6 +309,8 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) int segments = full_segments + (remaining > 0); char manifest[MAX_URL_SIZE]; + + // TODO: actually set this to now char *meta_mtime = "1386971541.005863"; char seg_base[MAX_URL_SIZE]; @@ -324,33 +319,35 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) char *string = strdup(path); - sprintf(seg_base, "%s", strsep(&string, "/")); + snprintf(seg_base, MAX_URL_SIZE, "%s", strsep(&string, "/")); char *container = strsep(&string, "/"); char *object = strsep(&string, "/"); - sprintf(manifest, "%s_segments/%s/%s/%ld/%ld/", container, object, - meta_mtime, flen, segment_size); - sprintf(seg_base, "%s/%s", seg_base, manifest); + snprintf(manifest, MAX_URL_SIZE, "%s_segments/%s/%s/%ld/%ld/", container, + object, meta_mtime, flen, segment_size); + + snprintf(seg_base, MAX_URL_SIZE, "%s/%s", seg_base, manifest); + free(string); struct segment_info *info = (struct segment_info *) malloc(segments * sizeof(struct segment_info)); pthread_t *threads = (pthread_t *)malloc(segments * sizeof(pthread_t)); - sprintf(file_path, "/proc/self/fd/%d", fileno(fp)); + + //TODO: portability? + snprintf(file_path, PATH_MAX, "/proc/self/fd/%d", fileno(fp)); for (i = 0; i < segments; i++) { - info[i].fp = fopen(file_path, "r"); - info[i].part = i; - info[i].size = i < full_segments ? segment_size : remaining; - info[i].seg_base = seg_base; - fprintf(stderr, "i %d full_segments %d size %ld seg_base %s \n\n", i, full_segments, info[i].size, seg_base ); - fprintf(stderr, "fp %d \n\n", info[i].fp); - pthread_create(&threads[i], NULL, upload_segment, (void *)&(info[i])); + info[i].fp = fopen(file_path, "r"); + info[i].part = i; + info[i].size = i < full_segments ? segment_size : remaining; + info[i].seg_base = seg_base; + pthread_create(&threads[i], NULL, upload_segment, (void *)&(info[i])); } for (i = 0; i < segments; i++) { - pthread_join(threads[i], NULL); + pthread_join(threads[i], NULL); } free(info); From 6ef6f947512ff5b88462213388f3fad5e9304887 Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Sat, 21 Dec 2013 21:01:30 -0600 Subject: [PATCH 11/42] possible portable version need to test --- cloudfsapi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 8abb573..6821af9 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -4,6 +4,7 @@ #include #include #include +#include #ifdef __linux__ #include #endif @@ -333,8 +334,13 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) pthread_t *threads = (pthread_t *)malloc(segments * sizeof(pthread_t)); - //TODO: portability? +#ifdef __linux__ snprintf(file_path, PATH_MAX, "/proc/self/fd/%d", fileno(fp)); +#else + //TODO: I haven't actually tested this + if (fcntl(fileno(fp), F_GETPATH, file_path) == -1) + fprintf(stderr, "couldn't get the path name\n"); +#endif for (i = 0; i < segments; i++) { info[i].fp = fopen(file_path, "r"); From 5f26d258eb66b9377839b360e437f007151d6108 Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Sun, 22 Dec 2013 14:52:07 -0600 Subject: [PATCH 12/42] closes #7 --- cloudfsapi.c | 2 -- cloudfsapi.h | 5 ++++- cloudfuse.c | 15 ++++++++++++++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 6821af9..861210e 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -32,8 +32,6 @@ static int curl_pool_count = 0; static int debug = 0; static int verify_ssl = 1; static int rhel5_mode = 0; -static long segment_size = 1073741824; -static long segment_above = 2147483648; #ifdef HAVE_OPENSSL #include diff --git a/cloudfsapi.h b/cloudfsapi.h index 54c403a..5a81dad 100644 --- a/cloudfsapi.h +++ b/cloudfsapi.h @@ -32,10 +32,13 @@ struct segment_info char *seg_base; }; +long segment_size; +long segment_above; + void cloudfs_init(); void cloudfs_set_credentials(char *username, char *tenant, char *password, char *authurl, char *region, int use_snet); -int cloufds_connect(); +int cloudfs_connect(); int cloudfs_object_read_fp(const char *path, FILE *fp); int cloudfs_object_write_fp(const char *path, FILE *fp); int cloudfs_list_directory(const char *path, dir_entry **); diff --git a/cloudfuse.c b/cloudfuse.c index aa3679c..78afbb3 100644 --- a/cloudfuse.c +++ b/cloudfuse.c @@ -21,6 +21,8 @@ #define OPTION_SIZE 1024 static int cache_timeout; +//long segment_size; +//long segment_above; typedef struct dir_cache { @@ -485,6 +487,8 @@ static struct options { char region[OPTION_SIZE]; char use_snet[OPTION_SIZE]; char verify_ssl[OPTION_SIZE]; + char segment_size[OPTION_SIZE]; + char segment_above[OPTION_SIZE]; } options = { .username = "", .password = "", @@ -494,6 +498,8 @@ static struct options { .region = "", .use_snet = "false", .verify_ssl = "true", + .segment_size = "1073741824", + .segment_above = "2147483648", }; int parse_option(void *data, const char *arg, int key, struct fuse_args *outargs) @@ -506,7 +512,9 @@ int parse_option(void *data, const char *arg, int key, struct fuse_args *outargs sscanf(arg, " authurl = %[^\r\n ]", options.authurl) || sscanf(arg, " region = %[^\r\n ]", options.region) || sscanf(arg, " use_snet = %[^\r\n ]", options.use_snet) || - sscanf(arg, " verify_ssl = %[^\r\n ]", options.verify_ssl)) + sscanf(arg, " verify_ssl = %[^\r\n ]", options.verify_ssl) || + sscanf(arg, " segment_above = %[^\r\n ]", options.segment_above) || + sscanf(arg, " segment_size = %[^\r\n ]", options.segment_size)) return 0; if (!strcmp(arg, "-f") || !strcmp(arg, "-d") || !strcmp(arg, "debug")) cloudfs_debug(1); @@ -532,6 +540,9 @@ int main(int argc, char **argv) cache_timeout = atoi(options.cache_timeout); + segment_size = atoll(options.segment_size); + segment_above = atoll(options.segment_above); + if (!*options.username || !*options.password) { fprintf(stderr, "Unable to determine username and API key.\n\n"); @@ -546,6 +557,8 @@ int main(int argc, char **argv) fprintf(stderr, " use_snet=[True to use Rackspace ServiceNet for connections]\n"); fprintf(stderr, " cache_timeout=[Seconds for directory caching, default 600]\n"); fprintf(stderr, " verify_ssl=[False to disable SSL cert verification]\n"); + fprintf(stderr, " segment_size=[Size to use when creating DLOs, default 1073741824]\n"); + fprintf(stderr, " segment_above=[File size at which to use segments, defult 2147483648]\n"); return 1; } From f2627a912d97af2ae94eb6e5c2202b942c9b2b1c Mon Sep 17 00:00:00 2001 From: amontero Date: Thu, 26 Dec 2013 17:29:59 +0100 Subject: [PATCH 13/42] Initial import of 'debian' files from Mike Mestnik's PPA. --- debian/README.Debian | 16 + debian/changelog | 5 + debian/compat | 1 + debian/control | 20 + debian/copyright | 76 + debian/docs | 1 + .../patches/0001-lock-mutex-around-login.txt | 32 + ...002-clear-xml-context-correctly-on-401.txt | 29 + ...ge-how-xml-context-is-reset-on-re-auth.txt | 40 + ...etry-logic-fix-multithreading-problems.txt | 154 + ...peer-on-auth.-TODO-make-that-an-option.txt | 26 + .../patches/0006-even-unsafer-ssl-options.txt | 32 + ...lean-up-C-code-remove-nested-functions.txt | 208 + ...me-using-the-Copy-object-functionality.txt | 166 + .../0009-add-contributors-to-README.txt | 30 + .../0010-protect-directories-from-rename.txt | 41 + ...011-arrange-code-back-to-my-preference.txt | 121 + ...012-remove-deprecated-unneeded-include.txt | 25 + ...add-openssl-to-the-configure-discovery.txt | 41 + debian/patches/0014-regenerate-configure.txt | 8888 +++++++++++++++++ .../0015-make-Makefile-obey-DESTDIR.txt | 25 + ...oca.h-for-Linux-Certainly-not-for-NetB.txt | 27 + ...17-parse-size-with-strtoll-Joseph-Dunn.txt | 25 + debian/patches/series | 17 + debian/rules | 13 + debian/source/format | 1 + debian/watch | 2 + 27 files changed, 10062 insertions(+) create mode 100644 debian/README.Debian create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100644 debian/patches/0001-lock-mutex-around-login.txt create mode 100644 debian/patches/0002-clear-xml-context-correctly-on-401.txt create mode 100644 debian/patches/0003-change-how-xml-context-is-reset-on-re-auth.txt create mode 100644 debian/patches/0004-improve-retry-logic-fix-multithreading-problems.txt create mode 100644 debian/patches/0005-don-t-verify-peer-on-auth.-TODO-make-that-an-option.txt create mode 100644 debian/patches/0006-even-unsafer-ssl-options.txt create mode 100644 debian/patches/0007-Clean-up-C-code-remove-nested-functions.txt create mode 100644 debian/patches/0008-Implement-rename-using-the-Copy-object-functionality.txt create mode 100644 debian/patches/0009-add-contributors-to-README.txt create mode 100644 debian/patches/0010-protect-directories-from-rename.txt create mode 100644 debian/patches/0011-arrange-code-back-to-my-preference.txt create mode 100644 debian/patches/0012-remove-deprecated-unneeded-include.txt create mode 100644 debian/patches/0013-add-openssl-to-the-configure-discovery.txt create mode 100644 debian/patches/0014-regenerate-configure.txt create mode 100644 debian/patches/0015-make-Makefile-obey-DESTDIR.txt create mode 100644 debian/patches/0016-Only-include-alloca.h-for-Linux-Certainly-not-for-NetB.txt create mode 100644 debian/patches/0017-parse-size-with-strtoll-Joseph-Dunn.txt create mode 100644 debian/patches/series create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/watch diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..c394db6 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,16 @@ +cloudfuse for Debian +-------------------- + +Please note that the simplest way to allow mounting of Swift shares is to +add the user to the fuse group (which will be created by the fuse-utils +package). + +To add user 'foo' to the 'fuse' group type the following command (with root +privileges): + + adduser foo fuse + +If the user is currently logged in he/she should log out and log in +in order for this change to take effect. + + -- Mike Mestnik Mon, 04 Jun 2012 13:47:28 -0500 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..ecf8780 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +cloudfuse (0.1-1) unstable; urgency=low + + * Initial release + + -- Mike Mestnik Mon, 04 Jun 2012 13:47:28 -0500 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +8 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..ef94d79 --- /dev/null +++ b/debian/control @@ -0,0 +1,20 @@ +Source: cloudfuse +Section: utils +Priority: optional +Maintainer: Mike Mestnik +Build-Depends: debhelper (>= 8.0.0), autotools-dev, libcurl4-openssl-dev, libxml2-dev, libssl-dev, libfuse-dev +Standards-Version: 3.9.2 +#Vcs-Git: git://git.debian.org/collab-maint/cloudfuse.git +#Vcs-Browser: http://git.debian.org/?p=collab-maint/cloudfuse.git;a=summary + +Package: cloudfuse +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, fuse (>= 2.7) [linux-any] | fuse4bsd [kfreebsd-any] +Description: filesystem client based on Swift as used by Rackspace. + cloudfuse is a FUSE application which provides access to Rackspace's + Cloud Files (or any installation of Swift). + . + cloudfuse is FUSE (Filesystem in USErspace). + . + cloudfuse may work with Openstack's Swift, but is not provided by Openstack. + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..bb5cf6a --- /dev/null +++ b/debian/copyright @@ -0,0 +1,76 @@ +Format: http://dep.debian.net/deps/dep5 +Upstream-Name: cloudfuse + +Files: * +Copyright: 2009 Michael Barton +License: MIT + 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 + 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. + +Files: debian/* +Copyright: 2012 Mike Mestnik +License: GPL-2+ + This package 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 package 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 + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + +Files: configure +Copyright: 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, + 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + Free Software Foundation, Inc. +License: No problem Bugroff + configure script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it. + +Files: install-sh +Copyright: 1994 X Consortium +License: MIT + 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. + diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +README diff --git a/debian/patches/0001-lock-mutex-around-login.txt b/debian/patches/0001-lock-mutex-around-login.txt new file mode 100644 index 0000000..873d2ee --- /dev/null +++ b/debian/patches/0001-lock-mutex-around-login.txt @@ -0,0 +1,32 @@ +From 60f5aa9871cfe6036554c914283355e95795985c Mon Sep 17 00:00:00 2001 +From: Mike Barton +Date: Mon, 7 Mar 2011 22:23:05 +0000 +Subject: [PATCH 01/17] lock mutex around login + +--- + cloudfsapi.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/cloudfsapi.c b/cloudfsapi.c +index 5636e41..10115b5 100644 +--- a/cloudfsapi.c ++++ b/cloudfsapi.c +@@ -398,6 +398,7 @@ int cloudfs_connect(char *username, char *password, char *authurl, int use_snet) + return size * nmemb; + } + ++ pthread_mutex_lock(&pool_mut); + storage_token[0] = storage_url[0] = '\0'; + curl_slist *headers = NULL; + add_header(&headers, "X-Auth-User", username); +@@ -416,6 +417,7 @@ int cloudfs_connect(char *username, char *password, char *authurl, int use_snet) + curl_easy_cleanup(curl); + if (use_snet && storage_url[0]) + rewrite_url_snet(storage_url); ++ pthread_mutex_unlock(&pool_mut); + return (response >= 200 && response < 300 && storage_token[0] && storage_url[0]); + } + +-- +1.7.9.5 + diff --git a/debian/patches/0002-clear-xml-context-correctly-on-401.txt b/debian/patches/0002-clear-xml-context-correctly-on-401.txt new file mode 100644 index 0000000..fa6cc5a --- /dev/null +++ b/debian/patches/0002-clear-xml-context-correctly-on-401.txt @@ -0,0 +1,29 @@ +From 6db27d240773fc65bc34d45e3f604518e2749dd0 Mon Sep 17 00:00:00 2001 +From: Mike Barton +Date: Thu, 10 Mar 2011 03:48:59 +0000 +Subject: [PATCH 02/17] clear xml context correctly on 401 + +--- + cloudfsapi.c | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/cloudfsapi.c b/cloudfsapi.c +index 10115b5..653afdb 100644 +--- a/cloudfsapi.c ++++ b/cloudfsapi.c +@@ -170,11 +170,7 @@ static int send_request(char *method, const char *path, FILE *fp, xmlParserCtxtP + curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); + } + if (xmlctx) +- { +- xmlFreeDoc(xmlctx->myDoc); +- xmlFreeParserCtxt(xmlctx); +- xmlctx = xmlCreatePushParserCtxt(NULL, NULL, "", 0, NULL); +- } ++ xmlClearParserCtxt(xmlctx); + if (fp) + rewind(fp); + debugf("Attempting request again"); +-- +1.7.9.5 + diff --git a/debian/patches/0003-change-how-xml-context-is-reset-on-re-auth.txt b/debian/patches/0003-change-how-xml-context-is-reset-on-re-auth.txt new file mode 100644 index 0000000..88e2bea --- /dev/null +++ b/debian/patches/0003-change-how-xml-context-is-reset-on-re-auth.txt @@ -0,0 +1,40 @@ +From 7b8f567a79e7e2eeb949cf101d7690c5a78a8da6 Mon Sep 17 00:00:00 2001 +From: Mike Barton +Date: Sun, 13 Mar 2011 18:07:33 +0000 +Subject: [PATCH 03/17] change how xml context is reset on re-auth + +--- + cloudfsapi.c | 4 +++- + cloudfuse.c | 1 - + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/cloudfsapi.c b/cloudfsapi.c +index 653afdb..5b80102 100644 +--- a/cloudfsapi.c ++++ b/cloudfsapi.c +@@ -170,7 +170,9 @@ static int send_request(char *method, const char *path, FILE *fp, xmlParserCtxtP + curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); + } + if (xmlctx) +- xmlClearParserCtxt(xmlctx); ++ { ++ xmlCtxtResetPush(xmlctx, NULL, 0, NULL, NULL); ++ } + if (fp) + rewind(fp); + debugf("Attempting request again"); +diff --git a/cloudfuse.c b/cloudfuse.c +index 71fab19..7ca29a4 100644 +--- a/cloudfuse.c ++++ b/cloudfuse.c +@@ -209,7 +209,6 @@ static int cfs_getattr(const char *path, struct stat *stbuf) + stbuf->st_size = de->size; + /* calc. blocks as if 4K blocksize filesystem; stat uses units of 512B */ + stbuf->st_blocks = ((4095 + de->size) / 4096) * 8; +- debugf("size %ld blocks %ld", de->size, stbuf->st_blocks); + stbuf->st_mode = S_IFREG | 0666; + stbuf->st_nlink = 1; + } +-- +1.7.9.5 + diff --git a/debian/patches/0004-improve-retry-logic-fix-multithreading-problems.txt b/debian/patches/0004-improve-retry-logic-fix-multithreading-problems.txt new file mode 100644 index 0000000..e855d9d --- /dev/null +++ b/debian/patches/0004-improve-retry-logic-fix-multithreading-problems.txt @@ -0,0 +1,154 @@ +From db8cd169c0566efdd9f9402793605fac9ec6aa58 Mon Sep 17 00:00:00 2001 +From: Mike Barton +Date: Mon, 14 Mar 2011 20:16:55 +0000 +Subject: [PATCH 04/17] improve retry logic, fix multithreading problems + +--- + cloudfsapi.c | 94 +++++++++++++++++++++++++++------------------------------- + 1 file changed, 44 insertions(+), 50 deletions(-) + +diff --git a/cloudfsapi.c b/cloudfsapi.c +index 5b80102..29fb87b 100644 +--- a/cloudfsapi.c ++++ b/cloudfsapi.c +@@ -14,6 +14,8 @@ + #include "cloudfsapi.h" + #include "config.h" + ++#define REQUEST_RETRIES 4 ++ + static char storage_url[MAX_URL_SIZE]; + static char storage_token[MAX_HEADER_SIZE]; + static pthread_mutex_t pool_mut; +@@ -70,12 +72,12 @@ static size_t xml_dispatch(void *ptr, size_t size, size_t nmemb, void *stream) + static CURL *get_connection(const char *path) + { + char url[MAX_URL_SIZE]; ++ pthread_mutex_lock(&pool_mut); + if (!storage_url[0]) + { + debugf("get_connection with no storage_url?"); + abort(); + } +- pthread_mutex_lock(&pool_mut); + CURL *curl = curl_pool_count ? curl_pool[--curl_pool_count] : curl_easy_init(); + if (!curl) + { +@@ -121,66 +123,57 @@ void add_header(curl_slist **headers, const char *name, const char *value) + static int send_request(char *method, const char *path, FILE *fp, xmlParserCtxtPtr xmlctx) + { + long response = -1; +- CURL *curl = get_connection(path); +- curl_slist *headers = NULL; +- add_header(&headers, "X-Auth-Token", storage_token); ++ int tries = 0; + +- if (!strcasecmp(method, "MKDIR")) +- { +- curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); +- curl_easy_setopt(curl, CURLOPT_INFILESIZE, 0); +- add_header(&headers, "Content-Type", "application/directory"); +- } +- else if (!strcasecmp(method, "PUT") && fp) +- { +- curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); +- curl_easy_setopt(curl, CURLOPT_INFILESIZE, file_size(fileno(fp))); +- curl_easy_setopt(curl, CURLOPT_READDATA, fp); +- } +- else ++ // retry on failures ++ for (tries = 0; tries < REQUEST_RETRIES; tries++) + { +- curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, method); +- if (xmlctx) ++ CURL *curl = get_connection(path); ++ curl_slist *headers = NULL; ++ add_header(&headers, "X-Auth-Token", storage_token); ++ if (!strcasecmp(method, "MKDIR")) + { +- curl_easy_setopt(curl, CURLOPT_WRITEDATA, xmlctx); +- curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &xml_dispatch); ++ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); ++ curl_easy_setopt(curl, CURLOPT_INFILESIZE, 0); ++ add_header(&headers, "Content-Type", "application/directory"); + } +- else if (fp) +- curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp); +- } +- curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); +- curl_easy_perform(curl); +- curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response); +- if (response >= 500 || response == 401) // retry on failures +- { +- sleep(5); +- if (response == 401) // re-authenticate on 401s ++ else if (!strcasecmp(method, "PUT") && fp) + { +- debugf("Re-authenticating"); +- curl_slist_free_all(headers); +- headers = NULL; +- if (!cloudfs_connect(0, 0, 0, 0)) +- { +- return_connection(curl); +- return response; +- } +- add_header(&headers, "X-Auth-Token", storage_token); +- if (!strcasecmp(method, "MKDIR")) +- add_header(&headers, "Content-Type", "application/directory"); +- curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); ++ rewind(fp); ++ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); ++ curl_easy_setopt(curl, CURLOPT_INFILESIZE, file_size(fileno(fp))); ++ curl_easy_setopt(curl, CURLOPT_READDATA, fp); + } +- if (xmlctx) ++ else if (!strcasecmp(method, "GET")) + { +- xmlCtxtResetPush(xmlctx, NULL, 0, NULL, NULL); ++ if (fp) ++ { ++ rewind(fp); // make sure the file is ready for a-writin' ++ fflush(fp); ++ ftruncate(fileno(fp), 0); ++ curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp); ++ } ++ else if (xmlctx) ++ { ++ curl_easy_setopt(curl, CURLOPT_WRITEDATA, xmlctx); ++ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &xml_dispatch); ++ } + } +- if (fp) +- rewind(fp); +- debugf("Attempting request again"); ++ else ++ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, method); ++ curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); + curl_easy_perform(curl); + curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response); ++ curl_slist_free_all(headers); ++ return_connection(curl); ++ if (response >= 200 && response < 400) ++ return response; ++ sleep(8 << tries); // backoff ++ if (response == 401 && !cloudfs_connect(0, 0, 0, 0)) // re-authenticate on 401s ++ return response; ++ if (xmlctx) ++ xmlCtxtResetPush(xmlctx, NULL, 0, NULL, NULL); + } +- curl_slist_free_all(headers); +- return_connection(curl); + return response; + } + +@@ -397,6 +390,7 @@ int cloudfs_connect(char *username, char *password, char *authurl, int use_snet) + } + + pthread_mutex_lock(&pool_mut); ++ debugf("Authenticating..."); + storage_token[0] = storage_url[0] = '\0'; + curl_slist *headers = NULL; + add_header(&headers, "X-Auth-User", username); +-- +1.7.9.5 + diff --git a/debian/patches/0005-don-t-verify-peer-on-auth.-TODO-make-that-an-option.txt b/debian/patches/0005-don-t-verify-peer-on-auth.-TODO-make-that-an-option.txt new file mode 100644 index 0000000..678a6fa --- /dev/null +++ b/debian/patches/0005-don-t-verify-peer-on-auth.-TODO-make-that-an-option.txt @@ -0,0 +1,26 @@ +From 1e9426ad7f4bb071aaf1297fc0899b6d5f902b2b Mon Sep 17 00:00:00 2001 +From: Mike Barton +Date: Fri, 1 Apr 2011 18:07:21 +0000 +Subject: [PATCH 05/17] don't verify peer on auth.. TODO: make that an option + +--- + cloudfsapi.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/cloudfsapi.c b/cloudfsapi.c +index 29fb87b..8ada14a 100644 +--- a/cloudfsapi.c ++++ b/cloudfsapi.c +@@ -402,7 +402,9 @@ int cloudfs_connect(char *username, char *password, char *authurl, int use_snet) + curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, &header_dispatch); + curl_easy_setopt(curl, CURLOPT_USERAGENT, USER_AGENT); + curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); ++ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); + curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10); ++ curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10); + curl_easy_perform(curl); + curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response); + curl_slist_free_all(headers); +-- +1.7.9.5 + diff --git a/debian/patches/0006-even-unsafer-ssl-options.txt b/debian/patches/0006-even-unsafer-ssl-options.txt new file mode 100644 index 0000000..9213a4d --- /dev/null +++ b/debian/patches/0006-even-unsafer-ssl-options.txt @@ -0,0 +1,32 @@ +From 0c63cc17e387ae436de4c5bc02785389ee94fbc2 Mon Sep 17 00:00:00 2001 +From: Mike Barton +Date: Fri, 1 Apr 2011 18:24:23 +0000 +Subject: [PATCH 06/17] even unsafer ssl options... + +--- + cloudfsapi.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/cloudfsapi.c b/cloudfsapi.c +index 8ada14a..9e3a9bc 100644 +--- a/cloudfsapi.c ++++ b/cloudfsapi.c +@@ -101,6 +101,7 @@ static CURL *get_connection(const char *path) + curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1); + curl_easy_setopt(curl, CURLOPT_USERAGENT, USER_AGENT); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); ++ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); + curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10); + return curl; + } +@@ -403,6 +404,7 @@ int cloudfs_connect(char *username, char *password, char *authurl, int use_snet) + curl_easy_setopt(curl, CURLOPT_USERAGENT, USER_AGENT); + curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); ++ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); + curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10); + curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10); + curl_easy_perform(curl); +-- +1.7.9.5 + diff --git a/debian/patches/0007-Clean-up-C-code-remove-nested-functions.txt b/debian/patches/0007-Clean-up-C-code-remove-nested-functions.txt new file mode 100644 index 0000000..704ed73 --- /dev/null +++ b/debian/patches/0007-Clean-up-C-code-remove-nested-functions.txt @@ -0,0 +1,208 @@ +From c4e9f3ce06f9502892dee8c6c0927282172bb9ff Mon Sep 17 00:00:00 2001 +From: Dillon Amburgey +Date: Wed, 27 Apr 2011 19:27:20 -0500 +Subject: [PATCH 07/17] Clean up C code, remove nested functions + +Allows building in non-gcc compilers (read: clang) +--- + cloudfsapi.c | 35 +++++++++++++++++---------------- + cloudfsapi.h | 2 ++ + cloudfuse.c | 61 +++++++++++++++------------------------------------------- + cloudfuse.h | 34 ++++++++++++++++++++++++++++++++ + 4 files changed, 69 insertions(+), 63 deletions(-) + create mode 100644 cloudfuse.h + +diff --git a/cloudfsapi.c b/cloudfsapi.c +index 9e3a9bc..d8d6dce 100644 +--- a/cloudfsapi.c ++++ b/cloudfsapi.c +@@ -373,23 +373,7 @@ int cloudfs_connect(char *username, char *password, char *authurl, int use_snet) + use_snet = reconnect_args.use_snet; + } + +- size_t header_dispatch(void *ptr, size_t size, size_t nmemb, void *stream) +- { +- char *header = (char *)alloca(size * nmemb + 1); +- char *head = (char *)alloca(size * nmemb + 1); +- char *value = (char *)alloca(size * nmemb + 1); +- memcpy(header, (char *)ptr, size * nmemb); +- header[size * nmemb] = '\0'; +- if (sscanf(header, "%[^:]: %[^\r\n]", head, value) == 2) +- { +- if (!strncasecmp(head, "x-auth-token", size * nmemb)) +- strncpy(storage_token, value, sizeof(storage_token)); +- if (!strncasecmp(head, "x-storage-url", size * nmemb)) +- strncpy(storage_url, value, sizeof(storage_url)); +- } +- return size * nmemb; +- } +- ++ + pthread_mutex_lock(&pool_mut); + debugf("Authenticating..."); + storage_token[0] = storage_url[0] = '\0'; +@@ -417,6 +401,23 @@ int cloudfs_connect(char *username, char *password, char *authurl, int use_snet) + return (response >= 200 && response < 300 && storage_token[0] && storage_url[0]); + } + ++size_t header_dispatch(void *ptr, size_t size, size_t nmemb, void *stream) ++{ ++ char *header = (char *)alloca(size * nmemb + 1); ++ char *head = (char *)alloca(size * nmemb + 1); ++ char *value = (char *)alloca(size * nmemb + 1); ++ memcpy(header, (char *)ptr, size * nmemb); ++ header[size * nmemb] = '\0'; ++ if (sscanf(header, "%[^:]: %[^\r\n]", head, value) == 2) ++ { ++ if (!strncasecmp(head, "x-auth-token", size * nmemb)) ++ strncpy(storage_token, value, sizeof(storage_token)); ++ if (!strncasecmp(head, "x-storage-url", size * nmemb)) ++ strncpy(storage_url, value, sizeof(storage_url)); ++ } ++ return size * nmemb; ++} ++ + void debugf(char *fmt, ...) + { + if (debug) +diff --git a/cloudfsapi.h b/cloudfsapi.h +index 19c7bf2..0ab1230 100644 +--- a/cloudfsapi.h ++++ b/cloudfsapi.h +@@ -37,6 +37,8 @@ int object_truncate(const char *path, off_t size); + void load_mimetypes(const char *filename); + off_t file_size(int fd); + ++size_t header_dispatch(void *ptr, size_t size, size_t nmemb, void *stream); ++ + void debugf(char *fmt, ...); + #endif + +diff --git a/cloudfuse.c b/cloudfuse.c +index 7ca29a4..b934e5a 100644 +--- a/cloudfuse.c ++++ b/cloudfuse.c +@@ -16,25 +16,8 @@ + #include + #include "cloudfsapi.h" + #include "config.h" ++#include "cloudfuse.h" + +-#define OPTION_SIZE 1024 +-static int cache_timeout; +- +-typedef struct dir_cache +-{ +- char *path; +- dir_entry *entries; +- time_t cached; +- struct dir_cache *next, *prev; +-} dir_cache; +-static dir_cache *dcache; +-static pthread_mutex_t dmut; +- +-typedef struct +-{ +- int fd; +- int flags; +-} openfile; + + static void dir_for(const char *path, char *dir) + { +@@ -398,39 +381,25 @@ char *get_home_dir() + return "~"; + } + ++int parse_option(void *data, const char *arg, int key, struct fuse_args *outargs) ++{ ++ if (sscanf(arg, " username = %[^\r\n ]", options.username) || ++ sscanf(arg, " api_key = %[^\r\n ]", options.api_key) || ++ sscanf(arg, " cache_timeout = %[^\r\n ]", options.cache_timeout) || ++ sscanf(arg, " authurl = %[^\r\n ]", options.authurl) || ++ sscanf(arg, " use_snet = %[^\r\n ]", options.use_snet)) ++ return 0; ++ if (!strcmp(arg, "-f") || !strcmp(arg, "-d") || !strcmp(arg, "debug")) ++ cloudfs_debug(1); ++ return 1; ++} ++ + int main(int argc, char **argv) + { + char settings_filename[MAX_PATH_SIZE] = ""; + FILE *settings; + struct fuse_args args = FUSE_ARGS_INIT(argc, argv); +- +- struct options { +- char username[OPTION_SIZE]; +- char api_key[OPTION_SIZE]; +- char cache_timeout[OPTION_SIZE]; +- char authurl[OPTION_SIZE]; +- char use_snet[OPTION_SIZE]; +- } options = { +- .username = "", +- .api_key = "", +- .cache_timeout = "600", +- .authurl = "https://auth.api.rackspacecloud.com/v1.0", +- .use_snet = "false", +- }; +- +- int parse_option(void *data, const char *arg, int key, struct fuse_args *outargs) +- { +- if (sscanf(arg, " username = %[^\r\n ]", options.username) || +- sscanf(arg, " api_key = %[^\r\n ]", options.api_key) || +- sscanf(arg, " cache_timeout = %[^\r\n ]", options.cache_timeout) || +- sscanf(arg, " authurl = %[^\r\n ]", options.authurl) || +- sscanf(arg, " use_snet = %[^\r\n ]", options.use_snet)) +- return 0; +- if (!strcmp(arg, "-f") || !strcmp(arg, "-d") || !strcmp(arg, "debug")) +- cloudfs_debug(1); +- return 1; +- } +- ++ + fuse_opt_parse(&args, &options, NULL, parse_option); + + snprintf(settings_filename, sizeof(settings_filename), "%s/.cloudfuse", get_home_dir()); +diff --git a/cloudfuse.h b/cloudfuse.h +new file mode 100644 +index 0000000..2572be2 +--- /dev/null ++++ b/cloudfuse.h +@@ -0,0 +1,34 @@ ++#define OPTION_SIZE 1024 ++ ++static int cache_timeout; ++ ++typedef struct dir_cache ++{ ++ char *path; ++ dir_entry *entries; ++ time_t cached; ++ struct dir_cache *next, *prev; ++} dir_cache; ++static dir_cache *dcache; ++static pthread_mutex_t dmut; ++ ++typedef struct ++{ ++ int fd; ++ int flags; ++} openfile; ++ ++struct options { ++ char username[OPTION_SIZE]; ++ char api_key[OPTION_SIZE]; ++ char cache_timeout[OPTION_SIZE]; ++ char authurl[OPTION_SIZE]; ++ char use_snet[OPTION_SIZE]; ++} options = { ++ .username = "", ++ .api_key = "", ++ .cache_timeout = "600", ++ .authurl = "https://auth.api.rackspacecloud.com/v1.0", ++ .use_snet = "false", ++}; ++ +-- +1.7.9.5 + diff --git a/debian/patches/0008-Implement-rename-using-the-Copy-object-functionality.txt b/debian/patches/0008-Implement-rename-using-the-Copy-object-functionality.txt new file mode 100644 index 0000000..fcbdc7c --- /dev/null +++ b/debian/patches/0008-Implement-rename-using-the-Copy-object-functionality.txt @@ -0,0 +1,166 @@ +From c4ab371ded302e26ceeb1559725dcf726f2e44a0 Mon Sep 17 00:00:00 2001 +From: Nick Craig-Wood +Date: Wed, 29 Jun 2011 17:43:44 +0100 +Subject: [PATCH 08/17] Implement rename using the Copy object functionality + +--- + cloudfsapi.c | 36 ++++++++++++++++++++++++++++-------- + cloudfsapi.h | 1 + + cloudfuse.c | 15 +++++++++++++++ + 3 files changed, 44 insertions(+), 8 deletions(-) + +diff --git a/cloudfsapi.c b/cloudfsapi.c +index 9e3a9bc..3924829 100644 +--- a/cloudfsapi.c ++++ b/cloudfsapi.c +@@ -121,7 +121,7 @@ void add_header(curl_slist **headers, const char *name, const char *value) + *headers = curl_slist_append(*headers, x_header); + } + +-static int send_request(char *method, const char *path, FILE *fp, xmlParserCtxtPtr xmlctx) ++static int send_request(char *method, const char *path, FILE *fp, xmlParserCtxtPtr xmlctx, curl_slist *extra_headers) + { + long response = -1; + int tries = 0; +@@ -132,6 +132,7 @@ static int send_request(char *method, const char *path, FILE *fp, xmlParserCtxtP + CURL *curl = get_connection(path); + curl_slist *headers = NULL; + add_header(&headers, "X-Auth-Token", storage_token); ++ curl_easy_setopt(curl, CURLOPT_VERBOSE, debug); + if (!strcasecmp(method, "MKDIR")) + { + curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); +@@ -162,6 +163,13 @@ static int send_request(char *method, const char *path, FILE *fp, xmlParserCtxtP + } + else + curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, method); ++ /* add the headers from extra_headers if any */ ++ curl_slist *extra; ++ for (extra = extra_headers; extra; extra = extra->next) ++ { ++ debugf("adding header: %s", extra->data); ++ headers = curl_slist_append(headers, extra->data); ++ } + curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); + curl_easy_perform(curl); + curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response); +@@ -187,7 +195,7 @@ int object_read_fp(const char *path, FILE *fp) + fflush(fp); + rewind(fp); + char *encoded = curl_escape(path, 0); +- int response = send_request("PUT", encoded, fp, NULL); ++ int response = send_request("PUT", encoded, fp, NULL, NULL); + curl_free(encoded); + return (response >= 200 && response < 300); + } +@@ -195,7 +203,7 @@ int object_read_fp(const char *path, FILE *fp) + int object_write_fp(const char *path, FILE *fp) + { + char *encoded = curl_escape(path, 0); +- int response = send_request("GET", encoded, fp, NULL); ++ int response = send_request("GET", encoded, fp, NULL, NULL); + curl_free(encoded); + fflush(fp); + if ((response >= 200 && response < 300) || ftruncate(fileno(fp), 0)) +@@ -211,12 +219,12 @@ int object_truncate(const char *path, off_t size) + if (size == 0) + { + FILE *fp = fopen("/dev/null", "r"); +- response = send_request("PUT", encoded, fp, NULL); ++ response = send_request("PUT", encoded, fp, NULL, NULL); + fclose(fp); + } + else + {//TODO: this is busted +- response = send_request("GET", encoded, NULL, NULL); ++ response = send_request("GET", encoded, NULL, NULL, NULL); + } + curl_free(encoded); + return (response >= 200 && response < 300); +@@ -246,7 +254,7 @@ int list_directory(const char *path, dir_entry **dir_list) + curl_free(encoded_container); + curl_free(encoded_object); + } +- response = send_request("GET", container, NULL, xmlctx); ++ response = send_request("GET", container, NULL, xmlctx, NULL); + xmlParseChunk(xmlctx, "", 0, 1); + if (xmlctx->wellFormed && response >= 200 && response < 300) + { +@@ -319,15 +327,27 @@ void free_dir_list(dir_entry *dir_list) + int delete_object(const char *path) + { + char *encoded = curl_escape(path, 0); +- int response = send_request("DELETE", encoded, NULL, NULL); ++ int response = send_request("DELETE", encoded, NULL, NULL, NULL); + curl_free(encoded); + return (response >= 200 && response < 300); + } + ++int copy_object(const char *src, const char *dst) ++{ ++ char *dst_encoded = curl_escape(dst, 0); ++ curl_slist *headers = NULL; ++ add_header(&headers, "X-Copy-From", src); ++ add_header(&headers, "Content-Length", "0"); ++ int response = send_request("PUT", dst_encoded, NULL, NULL, headers); ++ curl_free(dst_encoded); ++ curl_slist_free_all(headers); ++ return (response >= 200 && response < 300); ++} ++ + int create_directory(const char *path) + { + char *encoded = curl_escape(path, 0); +- int response = send_request("MKDIR", encoded, NULL, NULL); ++ int response = send_request("MKDIR", encoded, NULL, NULL, NULL); + curl_free(encoded); + return (response >= 200 && response < 300); + } +diff --git a/cloudfsapi.h b/cloudfsapi.h +index 19c7bf2..428fad0 100644 +--- a/cloudfsapi.h ++++ b/cloudfsapi.h +@@ -28,6 +28,7 @@ int object_read_fp(const char *path, FILE *fp); + int object_write_fp(const char *path, FILE *fp); + int list_directory(const char *path, dir_entry **); + int delete_object(const char *path); ++int copy_object(const char *src, const char *dst); + int create_directory(const char *label); + int cloudfs_connect(char *username, char *password, char *authurl, int snet_rewrite); + void cloudfs_debug(int dbg); +diff --git a/cloudfuse.c b/cloudfuse.c +index 7ca29a4..d04fece 100644 +--- a/cloudfuse.c ++++ b/cloudfuse.c +@@ -387,6 +387,20 @@ static int cfs_chmod(const char *path, mode_t mode) + return 0; + } + ++static int cfs_rename(const char *src, const char *dst) ++{ ++ dir_entry *src_de = path_info(src); ++ if (!src_de) ++ return -ENOENT; ++ if (copy_object(src, dst)) ++ { ++ /* FIXME this isn't quite right as doesn't preserve last modified */ ++ update_dir_cache(dst, src_de->size, 0); ++ return cfs_unlink(src); ++ } ++ return -EIO; ++} ++ + char *get_home_dir() + { + char *home; +@@ -489,6 +503,7 @@ int main(int argc, char **argv) + .statfs = cfs_statfs, + .chmod = cfs_chmod, + .chown = cfs_chown, ++ .rename = cfs_rename, + }; + + pthread_mutex_init(&dmut, NULL); +-- +1.7.9.5 + diff --git a/debian/patches/0009-add-contributors-to-README.txt b/debian/patches/0009-add-contributors-to-README.txt new file mode 100644 index 0000000..d4f64f8 --- /dev/null +++ b/debian/patches/0009-add-contributors-to-README.txt @@ -0,0 +1,30 @@ +From be9f18d67d3337423e5a1c27212b02e8dbe3291a Mon Sep 17 00:00:00 2001 +From: Mike Barton +Date: Fri, 12 Aug 2011 10:30:12 +0000 +Subject: [PATCH 09/17] add contributors to README + +--- + README | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/README b/README +index bcdbad5..451eae1 100644 +--- a/README ++++ b/README +@@ -73,6 +73,13 @@ BUGS/SHORTCOMINGS: + cloudfuse won't list more than that many files in a single directory. + + ++AWESOME CONTRIBUTORS: ++ ++ * Tim Dysinger fixed the Makefile https://github.com/dysinger ++ * Chris Wedgwood made du work by fixing stat https://github.com/cwedgwood ++ * Nick Craig-Wood implemented rename https://github.com/ncw ++ ++ + Thanks, and I hope you find it useful. + + Michael Barton +-- +1.7.9.5 + diff --git a/debian/patches/0010-protect-directories-from-rename.txt b/debian/patches/0010-protect-directories-from-rename.txt new file mode 100644 index 0000000..b523cbf --- /dev/null +++ b/debian/patches/0010-protect-directories-from-rename.txt @@ -0,0 +1,41 @@ +From ad9f1246b6c63c380f67c5af2144f87091dea3ed Mon Sep 17 00:00:00 2001 +From: Mike Barton +Date: Fri, 12 Aug 2011 10:41:08 +0000 +Subject: [PATCH 10/17] protect directories from rename + +--- + README | 4 +--- + cloudfuse.c | 2 ++ + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/README b/README +index 451eae1..7da4e6d 100644 +--- a/README ++++ b/README +@@ -58,9 +58,7 @@ USE: + + BUGS/SHORTCOMINGS: + +- * Doesn't implement rename(). There's no good way to do this with the +- Cloud Files API. Unfortunately, this makes cloudfuse considerably less +- useful in Finder, as it expects to be able to rename a lot. ++ * rename() doesn't work on directories (and probably never will). + * When reading and writing files, it buffers them in a local temp file. + * It keeps an in-memory cache of the directory structure, so it may not be + usable for large file systems. Also, files added by other applications +diff --git a/cloudfuse.c b/cloudfuse.c +index d04fece..af8bfc8 100644 +--- a/cloudfuse.c ++++ b/cloudfuse.c +@@ -392,6 +392,8 @@ static int cfs_rename(const char *src, const char *dst) + dir_entry *src_de = path_info(src); + if (!src_de) + return -ENOENT; ++ if (src_de->isdir) ++ return -EISDIR; + if (copy_object(src, dst)) + { + /* FIXME this isn't quite right as doesn't preserve last modified */ +-- +1.7.9.5 + diff --git a/debian/patches/0011-arrange-code-back-to-my-preference.txt b/debian/patches/0011-arrange-code-back-to-my-preference.txt new file mode 100644 index 0000000..2385357 --- /dev/null +++ b/debian/patches/0011-arrange-code-back-to-my-preference.txt @@ -0,0 +1,121 @@ +From 57a4969ef39427e23232c8ecbcbf90b6f57343d7 Mon Sep 17 00:00:00 2001 +From: Mike Barton +Date: Fri, 12 Aug 2011 10:55:01 +0000 +Subject: [PATCH 11/17] arrange code back to my preference ;) + +--- + README | 1 + + cloudfuse.c | 36 +++++++++++++++++++++++++++++++++++- + cloudfuse.h | 34 ---------------------------------- + 3 files changed, 36 insertions(+), 35 deletions(-) + delete mode 100644 cloudfuse.h + +diff --git a/README b/README +index 7da4e6d..bc2bf04 100644 +--- a/README ++++ b/README +@@ -76,6 +76,7 @@ AWESOME CONTRIBUTORS: + * Tim Dysinger fixed the Makefile https://github.com/dysinger + * Chris Wedgwood made du work by fixing stat https://github.com/cwedgwood + * Nick Craig-Wood implemented rename https://github.com/ncw ++ * Dillon Amburgey made it compile on clang https://github.com/dillona + + + Thanks, and I hope you find it useful. +diff --git a/cloudfuse.c b/cloudfuse.c +index 6149338..bf7e195 100644 +--- a/cloudfuse.c ++++ b/cloudfuse.c +@@ -16,7 +16,27 @@ + #include + #include "cloudfsapi.h" + #include "config.h" +-#include "cloudfuse.h" ++ ++ ++#define OPTION_SIZE 1024 ++ ++static int cache_timeout; ++ ++typedef struct dir_cache ++{ ++ char *path; ++ dir_entry *entries; ++ time_t cached; ++ struct dir_cache *next, *prev; ++} dir_cache; ++static dir_cache *dcache; ++static pthread_mutex_t dmut; ++ ++typedef struct ++{ ++ int fd; ++ int flags; ++} openfile; + + + static void dir_for(const char *path, char *dir) +@@ -397,6 +417,20 @@ char *get_home_dir() + return "~"; + } + ++static struct options { ++ char username[OPTION_SIZE]; ++ char api_key[OPTION_SIZE]; ++ char cache_timeout[OPTION_SIZE]; ++ char authurl[OPTION_SIZE]; ++ char use_snet[OPTION_SIZE]; ++} options = { ++ .username = "", ++ .api_key = "", ++ .cache_timeout = "600", ++ .authurl = "https://auth.api.rackspacecloud.com/v1.0", ++ .use_snet = "false", ++}; ++ + int parse_option(void *data, const char *arg, int key, struct fuse_args *outargs) + { + if (sscanf(arg, " username = %[^\r\n ]", options.username) || +diff --git a/cloudfuse.h b/cloudfuse.h +deleted file mode 100644 +index 2572be2..0000000 +--- a/cloudfuse.h ++++ /dev/null +@@ -1,34 +0,0 @@ +-#define OPTION_SIZE 1024 +- +-static int cache_timeout; +- +-typedef struct dir_cache +-{ +- char *path; +- dir_entry *entries; +- time_t cached; +- struct dir_cache *next, *prev; +-} dir_cache; +-static dir_cache *dcache; +-static pthread_mutex_t dmut; +- +-typedef struct +-{ +- int fd; +- int flags; +-} openfile; +- +-struct options { +- char username[OPTION_SIZE]; +- char api_key[OPTION_SIZE]; +- char cache_timeout[OPTION_SIZE]; +- char authurl[OPTION_SIZE]; +- char use_snet[OPTION_SIZE]; +-} options = { +- .username = "", +- .api_key = "", +- .cache_timeout = "600", +- .authurl = "https://auth.api.rackspacecloud.com/v1.0", +- .use_snet = "false", +-}; +- +-- +1.7.9.5 + diff --git a/debian/patches/0012-remove-deprecated-unneeded-include.txt b/debian/patches/0012-remove-deprecated-unneeded-include.txt new file mode 100644 index 0000000..25a50a6 --- /dev/null +++ b/debian/patches/0012-remove-deprecated-unneeded-include.txt @@ -0,0 +1,25 @@ +From fd960fbb3b4c9e29f7109e7963ddf1105911a7a8 Mon Sep 17 00:00:00 2001 +From: Mike Lundy +Date: Wed, 31 Aug 2011 15:50:06 -0700 +Subject: [PATCH 12/17] remove deprecated, unneeded include + +libcurl removed this header completely (it hasn't used it for ~7 years) +--- + cloudfsapi.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/cloudfsapi.h b/cloudfsapi.h +index ff443f7..54a5871 100644 +--- a/cloudfsapi.h ++++ b/cloudfsapi.h +@@ -2,7 +2,6 @@ + #define _CLOUDFSAPI_H + + #include +-#include + #include + + #define BUFFER_INITIAL_SIZE 4096 +-- +1.7.9.5 + diff --git a/debian/patches/0013-add-openssl-to-the-configure-discovery.txt b/debian/patches/0013-add-openssl-to-the-configure-discovery.txt new file mode 100644 index 0000000..2eb187a --- /dev/null +++ b/debian/patches/0013-add-openssl-to-the-configure-discovery.txt @@ -0,0 +1,41 @@ +From f23367e19c3ca77694d100b6a1ac3d00125e59b4 Mon Sep 17 00:00:00 2001 +From: Mike Lundy +Date: Wed, 31 Aug 2011 15:57:44 -0700 +Subject: [PATCH 13/17] add openssl to the configure discovery + +--- + Makefile.in | 4 ++-- + configure.in | 1 + + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index ab64bc0..05a22c5 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -2,9 +2,9 @@ + .SUFFIXES: .c .o + + CC = @CC@ +-CFLAGS = @CFLAGS@ @XML_CFLAGS@ @CURL_CFLAGS@ @FUSE_CFLAGS@ ++CFLAGS = @CFLAGS@ @XML_CFLAGS@ @CURL_CFLAGS@ @FUSE_CFLAGS@ @OPENSSL_CFLAGS@ + LDFLAGS = @LDFLAGS@ +-LIBS = @LIBS@ @XML_LIBS@ @CURL_LIBS@ @FUSE_LIBS@ ++LIBS = @LIBS@ @XML_LIBS@ @CURL_LIBS@ @FUSE_LIBS@ @OPENSSL_LIBS@ + INSTALL = @INSTALL@ + MKDIR_P = @MKDIR_P@ + prefix = @prefix@ +diff --git a/configure.in b/configure.in +index 9353ea3..1289317 100644 +--- a/configure.in ++++ b/configure.in +@@ -17,6 +17,7 @@ AC_PROG_MKDIR_P + PKG_CHECK_MODULES(XML, libxml-2.0, , AC_MSG_ERROR('Unable to find libxml2. Please make sure library and header files are installed.')) + PKG_CHECK_MODULES(CURL, libcurl, , AC_MSG_ERROR('Unable to find libcurl. Please make sure library and header files are installed.')) + PKG_CHECK_MODULES(FUSE, fuse, , AC_MSG_ERROR('Unable to find libfuse. Please make sure library and header files are installed.')) ++PKG_CHECK_MODULES(OPENSSL, openssl, , []) + + # Checks for header files. + AC_FUNC_ALLOCA +-- +1.7.9.5 + diff --git a/debian/patches/0014-regenerate-configure.txt b/debian/patches/0014-regenerate-configure.txt new file mode 100644 index 0000000..14eaad6 --- /dev/null +++ b/debian/patches/0014-regenerate-configure.txt @@ -0,0 +1,8888 @@ +From d0da9a0a6eedbcde3744074e58da85293e91f297 Mon Sep 17 00:00:00 2001 +From: Mike Lundy +Date: Wed, 31 Aug 2011 15:58:28 -0700 +Subject: [PATCH 14/17] regenerate configure + +--- + config.h.in | 5 +- + configure | 6602 +++++++++++++++++++++++++---------------------------------- + 2 files changed, 2747 insertions(+), 3860 deletions(-) + +diff --git a/config.h.in b/config.h.in +index c72d0b5..05a3799 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -88,7 +88,7 @@ + /* Define to 1 if you have the `strstr' function. */ + #undef HAVE_STRSTR + +-/* Define to 1 if `st_blocks' is member of `struct stat'. */ ++/* Define to 1 if `st_blocks' is a member of `struct stat'. */ + #undef HAVE_STRUCT_STAT_ST_BLOCKS + + /* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use +@@ -122,6 +122,9 @@ + /* Define to the one symbol short name of this package. */ + #undef PACKAGE_TARNAME + ++/* Define to the home page for this package. */ ++#undef PACKAGE_URL ++ + /* Define to the version of this package. */ + #undef PACKAGE_VERSION + +diff --git a/configure b/configure +index 0599a50..3691c78 100755 +--- a/configure ++++ b/configure +@@ -1,62 +1,85 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.61 for cloudfuse 0.9. ++# Generated by GNU Autoconf 2.68 for cloudfuse 0.9. + # + # Report bugs to >. + # ++# + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. ++# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software ++# Foundation, Inc. ++# ++# + # This configure script is free software; the Free Software Foundation + # gives unlimited permission to copy, distribute and modify it. +-## --------------------- ## +-## M4sh Initialization. ## +-## --------------------- ## ++## -------------------- ## ++## M4sh Initialization. ## ++## -------------------- ## + + # Be more Bourne compatible + DUALCASE=1; export DUALCASE # for MKS sh +-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: +- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ++ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST + else +- case `(set -o) 2>/dev/null` in +- *posix*) set -o posix ;; ++ case `(set -o) 2>/dev/null` in #( ++ *posix*) : ++ set -o posix ;; #( ++ *) : ++ ;; + esac +- + fi + + +- +- +-# PATH needs CR +-# Avoid depending upon Character Ranges. +-as_cr_letters='abcdefghijklmnopqrstuvwxyz' +-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +-as_cr_Letters=$as_cr_letters$as_cr_LETTERS +-as_cr_digits='0123456789' +-as_cr_alnum=$as_cr_Letters$as_cr_digits +- +-# The user is always right. +-if test "${PATH_SEPARATOR+set}" != set; then +- echo "#! /bin/sh" >conf$$.sh +- echo "exit 0" >>conf$$.sh +- chmod +x conf$$.sh +- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then +- PATH_SEPARATOR=';' ++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 +- PATH_SEPARATOR=: ++ 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 +- rm -f conf$$.sh ++ export as_echo_body ++ as_echo='sh -c $as_echo_body as_echo' + fi + +-# Support unset when possible. +-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +- as_unset=unset +-else +- as_unset=false ++# 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 + + +@@ -65,20 +88,19 @@ fi + # 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.) +-as_nl=' +-' + IFS=" "" $as_nl" + + # Find who we are. Look in the path if we contain no directory separator. +-case $0 in ++as_myself= ++case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +-done ++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ++ done + IFS=$as_save_IFS + + ;; +@@ -89,32 +111,278 @@ if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then +- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 +- { (exit 1); exit 1; } ++ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 ++ exit 1 + fi + +-# Work around bugs in pre-3.0 UWIN ksh. +-for as_var in ENV MAIL MAILPATH +-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++# Unset variables that we do not need and which cause bugs (e.g. in ++# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" ++# suppresses any "Segmentation fault" message there. '((' could ++# trigger a bug in pdksh 5.2.14. ++for as_var in BASH_ENV ENV MAIL MAILPATH ++do eval test x\${$as_var+set} = xset \ ++ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : + done + PS1='$ ' + PS2='> ' + PS4='+ ' + + # NLS nuisances. +-for as_var in \ +- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ +- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ +- LC_TELEPHONE LC_TIME ++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 ++test \$(( 1 + 1 )) = 2 || exit 1" ++ if (eval "$as_required") 2>/dev/null; then : ++ as_have_required=yes ++else ++ as_have_required=no ++fi ++ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : ++ ++else ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++as_found=false ++for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH + do +- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then +- eval $as_var=C; export $as_var ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ as_found=: ++ case $as_dir in #( ++ /*) ++ for as_base in sh bash ksh sh5; do ++ # Try only shells that exist, to save several forks. ++ as_shell=$as_dir/$as_base ++ if { test -f "$as_shell" || test -f "$as_shell.exe"; } && ++ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : ++ CONFIG_SHELL=$as_shell as_have_required=yes ++ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : ++ break 2 ++fi ++fi ++ done;; ++ esac ++ as_found=false ++done ++$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && ++ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : ++ CONFIG_SHELL=$SHELL as_have_required=yes ++fi; } ++IFS=$as_save_IFS ++ ++ ++ if test "x$CONFIG_SHELL" != x; then : ++ # We cannot yet assume a decent shell, so we have to provide a ++ # neutralization value for shells without unset; and this also ++ # works around shells that cannot unset nonexistent variables. ++ # Preserve -v and -x to the replacement shell. ++ BASH_ENV=/dev/null ++ ENV=/dev/null ++ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV ++ export CONFIG_SHELL ++ case $- in # (((( ++ *v*x* | *x*v* ) as_opts=-vx ;; ++ *v* ) as_opts=-v ;; ++ *x* ) as_opts=-x ;; ++ * ) as_opts= ;; ++ esac ++ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} ++fi ++ ++ if test x$as_have_required = xno; then : ++ $as_echo "$0: This script requires a shell more modern than all" ++ $as_echo "$0: the shells that I found on your system." ++ if test x${ZSH_VERSION+set} = xset ; then ++ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" ++ $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else +- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++ $as_echo "$0: Please tell bug-autoconf@gnu.org and Michael ++$0: Barton about your system, ++$0: including any error possibly output before this ++$0: message. Then install a modern shell, or manually run ++$0: the script under such a shell if you do have one." + fi +-done ++ exit 1 ++fi ++fi ++fi ++SHELL=${CONFIG_SHELL-/bin/sh} ++export SHELL ++# Unset more variables known to interfere with behavior of common tools. ++CLICOLOR_FORCE= GREP_OPTIONS= ++unset CLICOLOR_FORCE GREP_OPTIONS ++ ++## --------------------- ## ++## M4sh Shell Functions. ## ++## --------------------- ## ++# as_fn_unset VAR ++# --------------- ++# Portably unset VAR. ++as_fn_unset () ++{ ++ { eval $1=; unset $1;} ++} ++as_unset=as_fn_unset ++ ++# as_fn_set_status STATUS ++# ----------------------- ++# Set $? to STATUS, without forking. ++as_fn_set_status () ++{ ++ return $1 ++} # as_fn_set_status ++ ++# as_fn_exit STATUS ++# ----------------- ++# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. ++as_fn_exit () ++{ ++ set +e ++ as_fn_set_status $1 ++ exit $1 ++} # as_fn_exit ++ ++# as_fn_mkdir_p ++# ------------- ++# Create "$as_dir" as a directory, including parents if necessary. ++as_fn_mkdir_p () ++{ ++ ++ case $as_dir in #( ++ -*) as_dir=./$as_dir;; ++ esac ++ test -d "$as_dir" || eval $as_mkdir_p || { ++ as_dirs= ++ while :; do ++ case $as_dir in #( ++ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( ++ *) as_qdir=$as_dir;; ++ esac ++ as_dirs="'$as_qdir' $as_dirs" ++ as_dir=`$as_dirname -- "$as_dir" || ++$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ++ X"$as_dir" : 'X\(//\)[^/]' \| \ ++ X"$as_dir" : 'X\(//\)$' \| \ ++ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || ++$as_echo X"$as_dir" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ test -d "$as_dir" && break ++ done ++ test -z "$as_dirs" || eval "mkdir $as_dirs" ++ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" ++ ++ ++} # as_fn_mkdir_p ++# as_fn_append VAR VALUE ++# ---------------------- ++# Append the text in VALUE to the end of the definition contained in VAR. Take ++# advantage of any shell optimizations that allow amortized linear growth over ++# repeated appends, instead of the typical quadratic growth present in naive ++# implementations. ++if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : ++ eval 'as_fn_append () ++ { ++ eval $1+=\$2 ++ }' ++else ++ as_fn_append () ++ { ++ eval $1=\$$1\$2 ++ } ++fi # as_fn_append ++ ++# as_fn_arith ARG... ++# ------------------ ++# Perform arithmetic evaluation on the ARGs, and store the result in the ++# global $as_val. Take advantage of shells that can avoid forks. The arguments ++# must be portable across $(()) and expr. ++if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : ++ eval 'as_fn_arith () ++ { ++ as_val=$(( $* )) ++ }' ++else ++ as_fn_arith () ++ { ++ as_val=`expr "$@" || test $? -eq 1` ++ } ++fi # as_fn_arith ++ ++ ++# as_fn_error STATUS ERROR [LINENO LOG_FD] ++# ---------------------------------------- ++# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are ++# provided, also output the error to LOG_FD, referencing LINENO. Then exit the ++# script with STATUS, using 1 if that was 0. ++as_fn_error () ++{ ++ as_status=$1; test $as_status -eq 0 && as_status=1 ++ if test "$4"; then ++ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 ++ fi ++ $as_echo "$as_me: error: $2" >&2 ++ as_fn_exit $as_status ++} # as_fn_error + +-# Required to use basename. + if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +@@ -128,13 +396,17 @@ else + as_basename=false + fi + ++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then ++ as_dirname=dirname ++else ++ as_dirname=false ++fi + +-# Name of the executable. + as_me=`$as_basename -- "$0" || + $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +-echo X/"$0" | ++$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q +@@ -149,412 +421,127 @@ echo X/"$0" | + } + s/.*/./; q'` + +-# CDPATH. +-$as_unset CDPATH ++# Avoid depending upon Character Ranges. ++as_cr_letters='abcdefghijklmnopqrstuvwxyz' ++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ++as_cr_Letters=$as_cr_letters$as_cr_LETTERS ++as_cr_digits='0123456789' ++as_cr_alnum=$as_cr_Letters$as_cr_digits + + +-if test "x$CONFIG_SHELL" = x; then +- if (eval ":") 2>/dev/null; then +- as_have_required=yes +-else +- as_have_required=no +-fi ++ 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; } + +- if test $as_have_required = yes && (eval ": +-(as_func_return () { +- (exit \$1) +-} +-as_func_success () { +- as_func_return 0 +-} +-as_func_failure () { +- as_func_return 1 +-} +-as_func_ret_success () { +- return 0 +-} +-as_func_ret_failure () { +- return 1 ++ # 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 + } + +-exitcode=0 +-if as_func_success; then +- : +-else +- exitcode=1 +- echo as_func_success failed. +-fi +- +-if as_func_failure; then +- exitcode=1 +- echo as_func_failure succeeded. +-fi ++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 + +-if as_func_ret_success; then +- : ++rm -f conf$$ conf$$.exe conf$$.file ++if test -d conf$$.dir; then ++ rm -f conf$$.dir/conf$$.file + else +- exitcode=1 +- echo as_func_ret_success failed. +-fi +- +-if as_func_ret_failure; then +- exitcode=1 +- echo as_func_ret_failure succeeded. +-fi +- +-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then +- : ++ 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 +- exitcode=1 +- echo positional parameters were not saved. ++ as_ln_s='cp -p' + fi ++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file ++rmdir conf$$.dir 2>/dev/null + +-test \$exitcode = 0) || { (exit 1); exit 1; } +- +-( +- as_lineno_1=\$LINENO +- as_lineno_2=\$LINENO +- test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && +- test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +-") 2> /dev/null; then +- : ++if mkdir -p . 2>/dev/null; then ++ as_mkdir_p='mkdir -p "$as_dir"' + else +- as_candidate_shells= +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- case $as_dir in +- /*) +- for as_base in sh bash ksh sh5; do +- as_candidate_shells="$as_candidate_shells $as_dir/$as_base" +- done;; +- esac +-done +-IFS=$as_save_IFS +- ++ test -d ./-p && rmdir ./-p ++ as_mkdir_p=false ++fi + +- for as_shell in $as_candidate_shells $SHELL; do +- # Try only shells that exist, to save several forks. +- if { test -f "$as_shell" || test -f "$as_shell.exe"; } && +- { ("$as_shell") 2> /dev/null <<\_ASEOF +-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +- emulate sh +- NULLCMD=: +- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which +- # is contrary to our usage. Disable this feature. +- alias -g '${1+"$@"}'='"$@"' +- setopt NO_GLOB_SUBST ++if test -x / >/dev/null 2>&1; then ++ as_test_x='test -x' + else +- case `(set -o) 2>/dev/null` in +- *posix*) set -o posix ;; +-esac +- ++ 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'" + +-: +-_ASEOF +-}; then +- CONFIG_SHELL=$as_shell +- as_have_required=yes +- if { "$as_shell" 2> /dev/null <<\_ASEOF +-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +- emulate sh +- NULLCMD=: +- # Zsh 3.x and 4.x performs 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 ++# Sed expression to map a string onto a valid variable name. ++as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + +-fi + +- +-: +-(as_func_return () { +- (exit $1) +-} +-as_func_success () { +- as_func_return 0 +-} +-as_func_failure () { +- as_func_return 1 +-} +-as_func_ret_success () { +- return 0 +-} +-as_func_ret_failure () { +- return 1 +-} +- +-exitcode=0 +-if as_func_success; then +- : +-else +- exitcode=1 +- echo as_func_success failed. +-fi +- +-if as_func_failure; then +- exitcode=1 +- echo as_func_failure succeeded. +-fi +- +-if as_func_ret_success; then +- : +-else +- exitcode=1 +- echo as_func_ret_success failed. +-fi +- +-if as_func_ret_failure; then +- exitcode=1 +- echo as_func_ret_failure succeeded. +-fi +- +-if ( set x; as_func_ret_success y && test x = "$1" ); then +- : +-else +- exitcode=1 +- echo positional parameters were not saved. +-fi +- +-test $exitcode = 0) || { (exit 1); exit 1; } +- +-( +- as_lineno_1=$LINENO +- as_lineno_2=$LINENO +- test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } +- +-_ASEOF +-}; then +- break +-fi +- +-fi +- +- done +- +- if test "x$CONFIG_SHELL" != x; then +- for as_var in BASH_ENV ENV +- do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +- done +- export CONFIG_SHELL +- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +-fi +- +- +- if test $as_have_required = no; then +- echo This script requires a shell more modern than all the +- echo shells that I found on your system. Please install a +- echo modern shell, or manually run the script under such a +- echo shell if you do have one. +- { (exit 1); exit 1; } +-fi +- +- +-fi +- +-fi +- +- +- +-(eval "as_func_return () { +- (exit \$1) +-} +-as_func_success () { +- as_func_return 0 +-} +-as_func_failure () { +- as_func_return 1 +-} +-as_func_ret_success () { +- return 0 +-} +-as_func_ret_failure () { +- return 1 +-} +- +-exitcode=0 +-if as_func_success; then +- : +-else +- exitcode=1 +- echo as_func_success failed. +-fi +- +-if as_func_failure; then +- exitcode=1 +- echo as_func_failure succeeded. +-fi +- +-if as_func_ret_success; then +- : +-else +- exitcode=1 +- echo as_func_ret_success failed. +-fi +- +-if as_func_ret_failure; then +- exitcode=1 +- echo as_func_ret_failure succeeded. +-fi +- +-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then +- : +-else +- exitcode=1 +- echo positional parameters were not saved. +-fi +- +-test \$exitcode = 0") || { +- echo No shell found that supports shell functions. +- echo Please tell autoconf@gnu.org about your system, +- echo including any error possibly output before this +- echo message +-} +- +- +- +- as_lineno_1=$LINENO +- as_lineno_2=$LINENO +- test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { +- +- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO +- # uniformly replaced by the line number. The first 'sed' inserts a +- # line-number line after each line using $LINENO; the second 'sed' +- # does the real work. The second script uses 'N' to pair each +- # line-number line with the line containing $LINENO, and appends +- # trailing '-' during substitution so that $LINENO is not a special +- # case at line end. +- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the +- # scripts with optimization help from Paolo Bonzini. Blame Lee +- # E. McMahon (1931-1989) for sed's syntax. :-) +- sed -n ' +- p +- /[$]LINENO/= +- ' <$as_myself | +- sed ' +- s/[$]LINENO.*/&-/ +- t lineno +- b +- :lineno +- N +- :loop +- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ +- t loop +- s/-\n.*// +- ' >$as_me.lineno && +- chmod +x "$as_me.lineno" || +- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 +- { (exit 1); exit 1; }; } +- +- # Don't try to exec as it changes $[0], causing all sort of problems +- # (the dirname of $[0] is not the place where we might find the +- # original and so on. Autoconf is especially sensitive to this). +- . "./$as_me.lineno" +- # Exit status is that of the last command. +- exit +-} +- +- +-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then +- as_dirname=dirname +-else +- as_dirname=false +-fi +- +-ECHO_C= ECHO_N= ECHO_T= +-case `echo -n x` in +--n*) +- case `echo 'x\c'` in +- *c*) ECHO_T=' ';; # ECHO_T is single tab character. +- *) ECHO_C='\c';; +- esac;; +-*) +- ECHO_N='-n';; +-esac +- +-if expr a : '\(a\)' >/dev/null 2>&1 && +- test "X`expr 00001 : '.*\(...\)'`" = X001; then +- as_expr=expr +-else +- as_expr=false +-fi +- +-rm -f conf$$ conf$$.exe conf$$.file +-if test -d conf$$.dir; then +- rm -f conf$$.dir/conf$$.file +-else +- rm -f conf$$.dir +- mkdir conf$$.dir +-fi +-echo >conf$$.file +-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 +-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=: +-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 7<&0 &1 ++test -n "$DJDIR" || exec 7<&0 &1 + + # Name of the host. +-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, ++# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, + # so uname gets run too. + ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +@@ -569,7 +556,6 @@ cross_compiling=no + subdirs= + MFLAGS= + MAKEFLAGS= +-SHELL=${CONFIG_SHELL-/bin/sh} + + # Identity of this package. + PACKAGE_NAME='cloudfuse' +@@ -577,6 +563,7 @@ PACKAGE_TARNAME='cloudfuse' + PACKAGE_VERSION='0.9' + PACKAGE_STRING='cloudfuse 0.9' + PACKAGE_BUGREPORT='Michael Barton' ++PACKAGE_URL='' + + ac_unique_file="cloudfuse.c" + # Factoring default headers for most tests. +@@ -617,67 +604,76 @@ ac_includes_default="\ + + ac_header_list= + ac_func_list= +-ac_subst_vars='SHELL +-PATH_SEPARATOR +-PACKAGE_NAME +-PACKAGE_TARNAME +-PACKAGE_VERSION +-PACKAGE_STRING +-PACKAGE_BUGREPORT +-exec_prefix +-prefix +-program_transform_name +-bindir +-sbindir +-libexecdir +-datarootdir +-datadir +-sysconfdir +-sharedstatedir +-localstatedir +-includedir +-oldincludedir +-docdir +-infodir +-htmldir +-dvidir +-pdfdir +-psdir +-libdir +-localedir +-mandir +-DEFS +-ECHO_C +-ECHO_N +-ECHO_T +-LIBS +-build_alias +-host_alias +-target_alias +-CC +-CFLAGS +-LDFLAGS +-CPPFLAGS +-ac_ct_CC +-EXEEXT +-OBJEXT +-INSTALL_PROGRAM +-INSTALL_SCRIPT +-INSTALL_DATA +-PKG_CONFIG +-XML_CFLAGS +-XML_LIBS +-CURL_CFLAGS +-CURL_LIBS +-FUSE_CFLAGS +-FUSE_LIBS ++ac_subst_vars='LTLIBOBJS ++LIBOBJS + ALLOCA +-CPP +-GREP + EGREP +-LIBOBJS +-LTLIBOBJS' ++GREP ++CPP ++OPENSSL_LIBS ++OPENSSL_CFLAGS ++FUSE_LIBS ++FUSE_CFLAGS ++CURL_LIBS ++CURL_CFLAGS ++XML_LIBS ++XML_CFLAGS ++PKG_CONFIG_LIBDIR ++PKG_CONFIG_PATH ++PKG_CONFIG ++MKDIR_P ++INSTALL_DATA ++INSTALL_SCRIPT ++INSTALL_PROGRAM ++OBJEXT ++EXEEXT ++ac_ct_CC ++CPPFLAGS ++LDFLAGS ++CFLAGS ++CC ++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 ++' + ac_precious_vars='build_alias + host_alias + target_alias +@@ -687,18 +683,25 @@ LDFLAGS + LIBS + CPPFLAGS + PKG_CONFIG ++PKG_CONFIG_PATH ++PKG_CONFIG_LIBDIR + XML_CFLAGS + XML_LIBS + CURL_CFLAGS + CURL_LIBS + FUSE_CFLAGS + FUSE_LIBS +-CPP' ++OPENSSL_CFLAGS ++OPENSSL_LIBS ++CPP ++CPPFLAGS' + + + # 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 +@@ -754,8 +757,9 @@ do + fi + + case $ac_option in +- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; +- *) ac_optarg=yes ;; ++ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; ++ *=) ac_optarg= ;; ++ *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. +@@ -797,13 +801,20 @@ do + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) +- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` ++ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && +- { echo "$as_me: error: invalid feature name: $ac_feature" >&2 +- { (exit 1); exit 1; }; } +- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` +- eval enable_$ac_feature=no ;; ++ 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 ;; +@@ -816,13 +827,20 @@ do + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) +- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` ++ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && +- { echo "$as_me: error: invalid feature name: $ac_feature" >&2 +- { (exit 1); exit 1; }; } +- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` +- eval enable_$ac_feature=\$ac_optarg ;; ++ 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- \ +@@ -1013,22 +1031,36 @@ do + ac_init_version=: ;; + + -with-* | --with-*) +- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` ++ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && +- { echo "$as_me: error: invalid package name: $ac_package" >&2 +- { (exit 1); exit 1; }; } +- ac_package=`echo $ac_package | sed 's/[-.]/_/g'` +- eval with_$ac_package=\$ac_optarg ;; ++ 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_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` ++ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && +- { echo "$as_me: error: invalid package name: $ac_package" >&2 +- { (exit 1); exit 1; }; } +- ac_package=`echo $ac_package | sed 's/[-.]/_/g'` +- eval with_$ac_package=no ;; ++ 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. +@@ -1048,26 +1080,26 @@ do + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + +- -*) { echo "$as_me: error: unrecognized option: $ac_option +-Try \`$0 --help' for more information." >&2 +- { (exit 1); exit 1; }; } ++ -*) as_fn_error $? "unrecognized option: \`$ac_option' ++Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. +- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && +- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 +- { (exit 1); exit 1; }; } ++ case $ac_envvar in #( ++ '' | [0-9]* | *[!_$as_cr_alnum]* ) ++ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; ++ esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. +- echo "$as_me: WARNING: you should use --build, --host, --target" >&2 ++ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && +- echo "$as_me: WARNING: invalid host type: $ac_option" >&2 +- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ++ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 ++ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +@@ -1075,23 +1107,36 @@ done + + if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` +- { echo "$as_me: error: missing argument to $ac_option" >&2 +- { (exit 1); exit 1; }; } ++ as_fn_error $? "missing argument to $ac_option" ++fi ++ ++if test -n "$ac_unrecognized_opts"; then ++ case $enable_option_checking in ++ no) ;; ++ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; ++ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; ++ esac + fi + +-# Be sure to have absolute directory names. ++# 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 +- { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 +- { (exit 1); exit 1; }; } ++ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" + done + + # There might be people who depend on the old broken behavior: `$host' +@@ -1105,8 +1150,8 @@ target=$target_alias + if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe +- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. +- If a cross compiler is detected then cross compile mode will be used." >&2 ++ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. ++ If a cross compiler is detected then cross compile mode will be used" >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +@@ -1121,23 +1166,21 @@ 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 .` || +- { echo "$as_me: error: Working directory cannot be determined" >&2 +- { (exit 1); exit 1; }; } ++ as_fn_error $? "working directory cannot be determined" + test "X$ac_ls_di" = "X$ac_pwd_ls_di" || +- { echo "$as_me: error: pwd does not report name of working directory" >&2 +- { (exit 1); exit 1; }; } ++ as_fn_error $? "pwd does not report name of working directory" + + + # Find the source files, if location was not specified. + if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. +- ac_confdir=`$as_dirname -- "$0" || +-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$0" : 'X\(//\)[^/]' \| \ +- X"$0" : 'X\(//\)$' \| \ +- X"$0" : 'X\(/\)' \| . 2>/dev/null || +-echo X"$0" | ++ 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 +@@ -1164,13 +1207,11 @@ else + fi + if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." +- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +- { (exit 1); exit 1; }; } ++ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" + fi + ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" + ac_abs_confdir=`( +- cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 +- { (exit 1); exit 1; }; } ++ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` + # When building in place, set srcdir=. + if test "$ac_abs_confdir" = "$ac_pwd"; then +@@ -1210,7 +1251,7 @@ Configuration: + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit +- -q, --quiet, --silent do not print \`checking...' messages ++ -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files +@@ -1218,9 +1259,9 @@ Configuration: + + Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX +- [$ac_default_prefix] ++ [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX +- [PREFIX] ++ [PREFIX] + + By default, \`make install' will install all the files in + \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +@@ -1230,25 +1271,25 @@ for instance \`--prefix=\$HOME'. + For better control, use the options below. + + Fine tuning of the installation directories: +- --bindir=DIR user executables [EPREFIX/bin] +- --sbindir=DIR system admin executables [EPREFIX/sbin] +- --libexecdir=DIR program executables [EPREFIX/libexec] +- --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/cloudfuse] +- --htmldir=DIR html documentation [DOCDIR] +- --dvidir=DIR dvi documentation [DOCDIR] +- --pdfdir=DIR pdf documentation [DOCDIR] +- --psdir=DIR ps documentation [DOCDIR] ++ --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/cloudfuse] ++ --htmldir=DIR html documentation [DOCDIR] ++ --dvidir=DIR dvi documentation [DOCDIR] ++ --pdfdir=DIR pdf documentation [DOCDIR] ++ --psdir=DIR ps documentation [DOCDIR] + _ACEOF + + cat <<\_ACEOF +@@ -1267,15 +1308,23 @@ Some influential environment variables: + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l +- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if ++ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + PKG_CONFIG path to pkg-config utility ++ PKG_CONFIG_PATH ++ directories to add to pkg-config's search path ++ PKG_CONFIG_LIBDIR ++ path overriding pkg-config's built-in search path + XML_CFLAGS C compiler flags for XML, overriding pkg-config + XML_LIBS linker flags for XML, overriding pkg-config + CURL_CFLAGS C compiler flags for CURL, overriding pkg-config + CURL_LIBS linker flags for CURL, overriding pkg-config + FUSE_CFLAGS C compiler flags for FUSE, overriding pkg-config + FUSE_LIBS linker flags for FUSE, overriding pkg-config ++ OPENSSL_CFLAGS ++ C compiler flags for OPENSSL, overriding pkg-config ++ OPENSSL_LIBS ++ linker flags for OPENSSL, overriding pkg-config + CPP C preprocessor + + Use these variables to override the choices made by `configure' or to help +@@ -1289,15 +1338,17 @@ 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" || 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=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` ++ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. +- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` ++ 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/ ;; +@@ -1333,7 +1384,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else +- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 ++ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +@@ -1343,21 +1394,487 @@ test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF + cloudfuse configure 0.9 +-generated by GNU Autoconf 2.61 ++generated by GNU Autoconf 2.68 + +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. ++Copyright (C) 2010 Free Software Foundation, Inc. + This configure script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it. + _ACEOF + exit + fi ++ ++## ------------------------ ## ++## Autoconf initialization. ## ++## ------------------------ ## ++ ++# ac_fn_c_try_compile LINENO ++# -------------------------- ++# Try to compile conftest.$ac_ext, and return whether this succeeded. ++ac_fn_c_try_compile () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ rm -f conftest.$ac_objext ++ if { { ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_compile") 2>conftest.err ++ ac_status=$? ++ if test -s conftest.err; then ++ grep -v '^ *+' conftest.err >conftest.er1 ++ cat conftest.er1 >&5 ++ mv -f conftest.er1 conftest.err ++ fi ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then : ++ ac_retval=0 ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_retval=1 ++fi ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ as_fn_set_status $ac_retval ++ ++} # ac_fn_c_try_compile ++ ++# ac_fn_c_check_type LINENO TYPE VAR INCLUDES ++# ------------------------------------------- ++# Tests whether TYPE exists after having included INCLUDES, setting cache ++# variable VAR accordingly. ++ac_fn_c_check_type () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 ++$as_echo_n "checking for $2... " >&6; } ++if eval \${$3+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ eval "$3=no" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++int ++main () ++{ ++if (sizeof ($2)) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++int ++main () ++{ ++if (sizeof (($2))) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ++else ++ eval "$3=yes" ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ ++} # ac_fn_c_check_type ++ ++# ac_fn_c_try_cpp LINENO ++# ---------------------- ++# Try to preprocess conftest.$ac_ext, and return whether this succeeded. ++ac_fn_c_try_cpp () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ if { { ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ++ ac_status=$? ++ if test -s conftest.err; then ++ grep -v '^ *+' conftest.err >conftest.er1 ++ cat conftest.er1 >&5 ++ mv -f conftest.er1 conftest.err ++ fi ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } > conftest.i && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then : ++ ac_retval=0 ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_retval=1 ++fi ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ as_fn_set_status $ac_retval ++ ++} # ac_fn_c_try_cpp ++ ++# ac_fn_c_try_run LINENO ++# ---------------------- ++# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes ++# that executables *can* be run. ++ac_fn_c_try_run () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ if { { ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_link") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' ++ { { case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_try") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; }; then : ++ ac_retval=0 ++else ++ $as_echo "$as_me: program exited with status $ac_status" >&5 ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_retval=$ac_status ++fi ++ rm -rf conftest.dSYM conftest_ipa8_conftest.oo ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ as_fn_set_status $ac_retval ++ ++} # ac_fn_c_try_run ++ ++# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES ++# ------------------------------------------------------- ++# Tests whether HEADER exists and can be compiled using the include files in ++# INCLUDES, setting the cache variable VAR accordingly. ++ac_fn_c_check_header_compile () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 ++$as_echo_n "checking for $2... " >&6; } ++if eval \${$3+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++#include <$2> ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval "$3=yes" ++else ++ eval "$3=no" ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ ++} # ac_fn_c_check_header_compile ++ ++# ac_fn_c_try_link LINENO ++# ----------------------- ++# Try to link conftest.$ac_ext, and return whether this succeeded. ++ac_fn_c_try_link () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ rm -f conftest.$ac_objext conftest$ac_exeext ++ if { { ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_link") 2>conftest.err ++ ac_status=$? ++ if test -s conftest.err; then ++ grep -v '^ *+' conftest.err >conftest.er1 ++ cat conftest.er1 >&5 ++ mv -f conftest.er1 conftest.err ++ fi ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then : ++ ac_retval=0 ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_retval=1 ++fi ++ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information ++ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would ++ # interfere with the next link command; also delete a directory that is ++ # left behind by Apple's compiler. We do this before executing the actions. ++ rm -rf conftest.dSYM conftest_ipa8_conftest.oo ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ as_fn_set_status $ac_retval ++ ++} # ac_fn_c_try_link ++ ++# ac_fn_c_check_func LINENO FUNC VAR ++# ---------------------------------- ++# Tests whether FUNC exists, setting the cache variable VAR accordingly ++ac_fn_c_check_func () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 ++$as_echo_n "checking for $2... " >&6; } ++if eval \${$3+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++/* Define $2 to an innocuous variant, in case declares $2. ++ For example, HP-UX 11i declares gettimeofday. */ ++#define $2 innocuous_$2 ++ ++/* System header to define __stub macros and hopefully few prototypes, ++ which can conflict with char $2 (); below. ++ Prefer to if __STDC__ is defined, since ++ exists even on freestanding compilers. */ ++ ++#ifdef __STDC__ ++# include ++#else ++# include ++#endif ++ ++#undef $2 ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char $2 (); ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined __stub_$2 || defined __stub___$2 ++choke me ++#endif ++ ++int ++main () ++{ ++return $2 (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ eval "$3=yes" ++else ++ eval "$3=no" ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ ++} # ac_fn_c_check_func ++ ++# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES ++# ------------------------------------------------------- ++# Tests whether HEADER exists, giving a warning if it cannot be compiled using ++# the include files in INCLUDES and setting the cache variable VAR ++# accordingly. ++ac_fn_c_check_header_mongrel () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ if eval \${$3+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 ++$as_echo_n "checking for $2... " >&6; } ++if eval \${$3+:} false; then : ++ $as_echo_n "(cached) " >&6 ++fi ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++else ++ # Is the header compilable? ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 ++$as_echo_n "checking $2 usability... " >&6; } ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++#include <$2> ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_header_compiler=yes ++else ++ ac_header_compiler=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 ++$as_echo "$ac_header_compiler" >&6; } ++ ++# Is the header present? ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 ++$as_echo_n "checking $2 presence... " >&6; } ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include <$2> ++_ACEOF ++if ac_fn_c_try_cpp "$LINENO"; then : ++ ac_header_preproc=yes ++else ++ ac_header_preproc=no ++fi ++rm -f conftest.err conftest.i conftest.$ac_ext ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 ++$as_echo "$ac_header_preproc" >&6; } ++ ++# So? What about this header? ++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( ++ yes:no: ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 ++$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 ++$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ++ ;; ++ no:yes:* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 ++$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 ++$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 ++$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 ++$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 ++$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ++( $as_echo "## ---------------------------------------------------- ## ++## Report this to Michael Barton ## ++## ---------------------------------------------------- ##" ++ ) | sed "s/^/$as_me: WARNING: /" >&2 ++ ;; ++esac ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 ++$as_echo_n "checking for $2... " >&6; } ++if eval \${$3+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ eval "$3=\$ac_header_compiler" ++fi ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++fi ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ ++} # ac_fn_c_check_header_mongrel ++ ++# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES ++# ---------------------------------------------------- ++# Tries to find if the field MEMBER exists in type AGGR, after including ++# INCLUDES, setting cache variable VAR accordingly. ++ac_fn_c_check_member () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 ++$as_echo_n "checking for $2.$3... " >&6; } ++if eval \${$4+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$5 ++int ++main () ++{ ++static $2 ac_aggr; ++if (ac_aggr.$3) ++return 0; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval "$4=yes" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$5 ++int ++main () ++{ ++static $2 ac_aggr; ++if (sizeof ac_aggr.$3) ++return 0; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval "$4=yes" ++else ++ eval "$4=no" ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++eval ac_res=\$$4 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ ++} # ac_fn_c_check_member + 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 cloudfuse $as_me 0.9, which was +-generated by GNU Autoconf 2.61. Invocation command line was ++generated by GNU Autoconf 2.68. Invocation command line was + + $ $0 $@ + +@@ -1393,8 +1910,8 @@ for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- echo "PATH: $as_dir" +-done ++ $as_echo "PATH: $as_dir" ++ done + IFS=$as_save_IFS + + } >&5 +@@ -1428,12 +1945,12 @@ do + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) +- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; ++ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in +- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; ++ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) +- ac_configure_args1="$ac_configure_args1 '$ac_arg'" ++ as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else +@@ -1449,13 +1966,13 @@ do + -* ) ac_must_keep_next=true ;; + esac + fi +- ac_configure_args="$ac_configure_args '$ac_arg'" ++ as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done + done +-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } ++{ ac_configure_args0=; unset ac_configure_args0;} ++{ ac_configure_args1=; unset ac_configure_args1;} + + # When interrupted or exit'd, cleanup temporary files, and complete + # config.log. We remove comments because anyway the quotes in there +@@ -1467,11 +1984,9 @@ trap 'exit_status=$? + { + echo + +- cat <<\_ASBOX +-## ---------------- ## ++ $as_echo "## ---------------- ## + ## Cache variables. ## +-## ---------------- ## +-_ASBOX ++## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, + ( +@@ -1480,12 +1995,13 @@ _ASBOX + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( +- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; ++ *_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) ;; #( +- *) $as_unset $ac_var ;; ++ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( ++ *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done +@@ -1504,134 +2020,142 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + ) + echo + +- cat <<\_ASBOX +-## ----------------- ## ++ $as_echo "## ----------------- ## + ## Output variables. ## +-## ----------------- ## +-_ASBOX ++## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in +- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; ++ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac +- echo "$ac_var='\''$ac_val'\''" ++ $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then +- cat <<\_ASBOX +-## ------------------- ## ++ $as_echo "## ------------------- ## + ## File substitutions. ## +-## ------------------- ## +-_ASBOX ++## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in +- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; ++ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac +- echo "$ac_var='\''$ac_val'\''" ++ $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then +- cat <<\_ASBOX +-## ----------- ## ++ $as_echo "## ----------- ## + ## confdefs.h. ## +-## ----------- ## +-_ASBOX ++## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && +- echo "$as_me: caught signal $ac_signal" +- echo "$as_me: exit $exit_status" ++ $as_echo "$as_me: caught signal $ac_signal" ++ $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core 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'; { (exit 1); exit 1; }' $ac_signal ++ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal + done + ac_signal=0 + + # confdefs.h avoids OS command line length limits that DEFS can exceed. + rm -f -r conftest* confdefs.h + ++$as_echo "/* confdefs.h */" > confdefs.h ++ + # Predefined preprocessor variables. + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_NAME "$PACKAGE_NAME" + _ACEOF + +- + cat >>confdefs.h <<_ACEOF + #define PACKAGE_TARNAME "$PACKAGE_TARNAME" + _ACEOF + +- + cat >>confdefs.h <<_ACEOF + #define PACKAGE_VERSION "$PACKAGE_VERSION" + _ACEOF + +- + cat >>confdefs.h <<_ACEOF + #define PACKAGE_STRING "$PACKAGE_STRING" + _ACEOF + +- + cat >>confdefs.h <<_ACEOF + #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" + _ACEOF + ++cat >>confdefs.h <<_ACEOF ++#define PACKAGE_URL "$PACKAGE_URL" ++_ACEOF ++ + + # Let the site file select an alternate cache file if it wants to. +-# Prefer explicitly selected file to automatically selected ones. ++# Prefer an explicitly selected file to automatically selected ones. ++ac_site_file1=NONE ++ac_site_file2=NONE + if test -n "$CONFIG_SITE"; then +- set x "$CONFIG_SITE" ++ # We do not want a PATH search for config.site. ++ case $CONFIG_SITE in #(( ++ -*) ac_site_file1=./$CONFIG_SITE;; ++ */*) ac_site_file1=$CONFIG_SITE;; ++ *) ac_site_file1=./$CONFIG_SITE;; ++ esac + elif test "x$prefix" != xNONE; then +- set x "$prefix/share/config.site" "$prefix/etc/config.site" ++ ac_site_file1=$prefix/share/config.site ++ ac_site_file2=$prefix/etc/config.site + else +- set x "$ac_default_prefix/share/config.site" \ +- "$ac_default_prefix/etc/config.site" ++ ac_site_file1=$ac_default_prefix/share/config.site ++ ac_site_file2=$ac_default_prefix/etc/config.site + fi +-shift +-for ac_site_file ++for ac_site_file in "$ac_site_file1" "$ac_site_file2" + do +- if test -r "$ac_site_file"; then +- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +-echo "$as_me: loading site script $ac_site_file" >&6;} ++ 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" ++ . "$ac_site_file" \ ++ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error $? "failed to load site script $ac_site_file ++See \`config.log' for more details" "$LINENO" 5; } + fi + done + + if test -r "$cache_file"; then +- # Some versions of bash will fail to source /dev/null (special +- # files actually), so we avoid doing that. +- if test -f "$cache_file"; then +- { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +-echo "$as_me: loading cache $cache_file" >&6;} ++ # 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 +- { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +-echo "$as_me: creating cache $cache_file" >&6;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 ++$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file + fi + +-ac_header_list="$ac_header_list sys/time.h" +-ac_header_list="$ac_header_list unistd.h" +-ac_func_list="$ac_func_list alarm" ++as_fn_append ac_header_list " sys/time.h" ++as_fn_append ac_header_list " unistd.h" ++as_fn_append ac_func_list " alarm" + # Check that the precious variables saved in the cache have kept the same + # value. + ac_cache_corrupted=false +@@ -1642,68 +2166,56 @@ for ac_var in $ac_precious_vars; do + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) +- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ++ { $as_echo "$as_me:${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) +- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ++ { $as_echo "$as_me:${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 +- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} +- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +-echo "$as_me: former value: $ac_old_val" >&2;} +- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +-echo "$as_me: current value: $ac_new_val" >&2;} +- ac_cache_corrupted=: ++ # differences in whitespace do not lead to failure. ++ ac_old_val_w=`echo x $ac_old_val` ++ ac_new_val_w=`echo x $ac_new_val` ++ if test "$ac_old_val_w" != "$ac_new_val_w"; then ++ { $as_echo "$as_me:${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=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; ++ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. +- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; ++ *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi + done + if $ac_cache_corrupted; then +- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +-echo "$as_me: error: changes in the environment can compromise the build" >&2;} +- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} +- { (exit 1); exit 1; }; } ++ { $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' +@@ -1733,10 +2245,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. + set dummy ${ac_tool_prefix}gcc; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_CC+:} false; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +@@ -1746,25 +2258,25 @@ for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- { echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 ++$as_echo "$CC" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -1773,10 +2285,10 @@ if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_CC+:} false; 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. +@@ -1786,25 +2298,25 @@ for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + ac_ct_CC=$ac_cv_prog_ac_ct_CC + if test -n "$ac_ct_CC"; then +- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +-echo "${ECHO_T}$ac_ct_CC" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 ++$as_echo "$ac_ct_CC" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_CC" = x; then +@@ -1812,12 +2324,8 @@ fi + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +-whose name does not start with the host triplet. If you think this +-configuration is useful to you, please write to autoconf@gnu.org." >&5 +-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +-whose name does not start with the host triplet. If you think this +-configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++{ $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 +@@ -1830,10 +2338,10 @@ 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 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_CC+:} false; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +@@ -1843,25 +2351,25 @@ for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- { echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 ++$as_echo "$CC" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -1870,10 +2378,10 @@ fi + if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. + set dummy cc; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_CC+:} false; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +@@ -1884,18 +2392,18 @@ for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + if test $ac_prog_rejected = yes; then +@@ -1914,11 +2422,11 @@ fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- { echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 ++$as_echo "$CC" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -1929,10 +2437,10 @@ if test -z "$CC"; then + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_CC+:} false; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +@@ -1942,25 +2450,25 @@ for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- { echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 ++$as_echo "$CC" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -1973,10 +2481,10 @@ if test -z "$CC"; then + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_CC+:} false; 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. +@@ -1986,25 +2494,25 @@ for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + ac_ct_CC=$ac_cv_prog_ac_ct_CC + if test -n "$ac_ct_CC"; then +- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +-echo "${ECHO_T}$ac_ct_CC" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 ++$as_echo "$ac_ct_CC" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -2016,12 +2524,8 @@ done + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +-whose name does not start with the host triplet. If you think this +-configuration is useful to you, please write to autoconf@gnu.org." >&5 +-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +-whose name does not start with the host triplet. If you think this +-configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++{ $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 +@@ -2031,51 +2535,37 @@ fi + fi + + +-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +-See \`config.log' for more details." >&5 +-echo "$as_me: error: no acceptable C compiler found in \$PATH +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++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. +-echo "$as_me:$LINENO: checking for C compiler version" >&5 +-ac_compiler=`set X $ac_compile; echo $2` +-{ (ac_try="$ac_compiler --version >&5" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compiler --version >&5") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } +-{ (ac_try="$ac_compiler -v >&5" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compiler -v >&5") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } +-{ (ac_try="$ac_compiler -V >&5" ++$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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compiler -V >&5") 2>&5 ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } ++ if test -s conftest.err; then ++ sed '10a\ ++... rest of stderr output deleted ... ++ 10q' conftest.err >conftest.er1 ++ cat conftest.er1 >&5 ++ fi ++ rm -f conftest.er1 conftest.err ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++done + +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -2087,42 +2577,38 @@ main () + } + _ACEOF + ac_clean_files_save=$ac_clean_files +-ac_clean_files="$ac_clean_files a.out a.exe b.out" ++ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" + # Try to create an executable without -o first, disregard a.out. + # It will help us diagnose broken compilers, and finding out an intuition + # of exeext. +-{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +-# +-# List of possible output files, starting from the most likely. +-# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +-# only as a last resort. b.out is created by i960 compilers. +-ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +-# +-# The IRIX 6 linker writes into existing files which may not be +-# executable, retaining their permissions. Remove them first so a +-# subsequent execution test works. ++{ $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 | *.o | *.obj ) ;; ++ *.$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" ++if { { ac_try="$ac_link_default" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. + # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' + # in a Makefile. We should not override ac_cv_exeext if it was cached, +@@ -2132,14 +2618,14 @@ 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 | *.o | *.obj ) ++ *.$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; ++ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi +@@ -2158,78 +2644,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= + else + ac_file='' + fi +- +-{ echo "$as_me:$LINENO: result: $ac_file" >&5 +-echo "${ECHO_T}$ac_file" >&6; } +-if test -z "$ac_file"; then +- echo "$as_me: failed program was:" >&5 ++if test -z "$ac_file"; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++$as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +-See \`config.log' for more details." >&5 +-echo "$as_me: error: C compiler cannot create executables +-See \`config.log' for more details." >&2;} +- { (exit 77); exit 77; }; } ++{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error 77 "C compiler cannot create executables ++See \`config.log' for more details" "$LINENO" 5; } ++else ++ { $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 + +-# Check that the compiler produces executables we can run. If not, either +-# the compiler is broken, or we cross compile. +-{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +-# If not cross compiling, check that we can run a simple program. +-if test "$cross_compiling" != yes; then +- if { ac_try='./$ac_file' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- cross_compiling=no +- else +- if test "$cross_compiling" = maybe; then +- cross_compiling=yes +- else +- { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +-If you meant to cross compile, use \`--host'. +-See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot run C compiled programs. +-If you meant to cross compile, use \`--host'. +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } +- fi +- fi +-fi +-{ echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6; } +- +-rm -f a.out a.exe conftest$ac_cv_exeext b.out ++rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out + ac_clean_files=$ac_clean_files_save +-# Check that the compiler produces executables we can run. If not, either +-# the compiler is broken, or we cross compile. +-{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +-{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +-echo "${ECHO_T}$cross_compiling" >&6; } +- +-{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +-if { (ac_try="$ac_link" ++{ $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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) + # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will + # work properly (i.e., refer to `conftest.exe'), while it won't with +@@ -2237,37 +2686,90 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in +- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; ++ *.$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 +- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +-See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++ { { $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$ac_cv_exeext +-{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +-echo "${ECHO_T}$ac_cv_exeext" >&6; } ++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 +-{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +-if test "${ac_cv_objext+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ ++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 +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_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 ${ac_cv_objext+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -2279,51 +2781,46 @@ main () + } + _ACEOF + rm -f conftest.o conftest.obj +-if { (ac_try="$ac_compile" ++if { { ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in +- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac + done + else +- echo "$as_me: failed program was:" >&5 ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +-See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot compute suffix of object files: cannot compile +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++{ { $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 +-{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +-echo "${ECHO_T}$ac_cv_objext" >&6; } ++{ $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 +-{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +-if test "${ac_cv_c_compiler_gnu+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $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 ${ac_cv_c_compiler_gnu+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -2337,54 +2834,34 @@ main () + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_compiler_gnu=no ++ ac_compiler_gnu=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_c_compiler_gnu=$ac_compiler_gnu + + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +-GCC=`test $ac_compiler_gnu = yes && echo yes` ++{ $as_echo "$as_me:${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 +-{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +-if test "${ac_cv_prog_cc_g+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 ++$as_echo_n "checking whether $CC accepts -g... " >&6; } ++if ${ac_cv_prog_cc_g+:} false; then : ++ $as_echo_n "(cached) " >&6 + else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -2395,34 +2872,11 @@ main () + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- CFLAGS="" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ CFLAGS="" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -2433,35 +2887,12 @@ main () + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- : +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++if ac_fn_c_try_compile "$LINENO"; then : + +- ac_c_werror_flag=$ac_save_c_werror_flag ++else ++ ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -2472,42 +2903,18 @@ main () + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } ++{ $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 +@@ -2523,18 +2930,14 @@ else + CFLAGS= + fi + fi +-{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +-echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +-if test "${ac_cv_prog_cc_c89+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $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 ${ac_cv_prog_cc_c89+:} false; then : ++ $as_echo_n "(cached) " >&6 + else + ac_cv_prog_cc_c89=no + ac_save_CC=$CC +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -2591,31 +2994,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" + do + CC="$ac_save_CC $ac_arg" +- rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++ if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- + rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break + done +@@ -2626,17 +3007,19 @@ fi + # AC_CACHE_VAL + case "x$ac_cv_prog_cc_c89" in + x) +- { echo "$as_me:$LINENO: result: none needed" >&5 +-echo "${ECHO_T}none needed" >&6; } ;; ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 ++$as_echo "none needed" >&6; } ;; + xno) +- { echo "$as_me:$LINENO: result: unsupported" >&5 +-echo "${ECHO_T}unsupported" >&6; } ;; ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 ++$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" +- { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +-echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; ++ { $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' +@@ -2661,9 +3044,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + fi + done + if test -z "$ac_aux_dir"; then +- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +-echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + fi + + # These three variables are undocumented and unsupported, +@@ -2688,22 +3069,23 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # OS/2's system install, which has a completely different semantic + # ./install, which can be erroneously created by make from ./install.sh. +-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } ++# Reject install programs that cannot install multiple files. ++{ $as_echo "$as_me:${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 +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++if ${ac_cv_path_install+:} false; 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/* | \ ++ # Account for people who put trailing slashes in PATH elements. ++case $as_dir/ in #(( ++ ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ +- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ ++ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. +@@ -2721,17 +3103,29 @@ case $as_dir/ in + # program-specific install script used by HP pwplus--don't use. + : + else +- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" +- break 3 ++ rm -rf conftest.one conftest.two conftest.dir ++ echo one > conftest.one ++ echo two > conftest.two ++ mkdir conftest.dir ++ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && ++ test -s conftest.one && test -s conftest.two && ++ test -s conftest.dir/conftest.one && ++ test -s conftest.dir/conftest.two ++ then ++ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" ++ break 3 ++ fi + fi + fi + done + done + ;; + esac +-done ++ ++ done + IFS=$as_save_IFS + ++rm -rf conftest.one conftest.two conftest.dir + + fi + if test "${ac_cv_path_install+set}" = set; then +@@ -2744,8 +3138,8 @@ fi + INSTALL=$ac_install_sh + fi + fi +-{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +-echo "${ECHO_T}$INSTALL" >&6; } ++{ $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. +@@ -2755,18 +3149,18 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +-{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +-echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } ++{ $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 +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ if ${ac_cv_path_mkdir+:} false; 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_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 #( +@@ -2778,11 +3172,12 @@ do + esac + done + 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 +@@ -2790,25 +3185,29 @@ fi + # 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. +- test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi + fi +-{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +-echo "${ECHO_T}$MKDIR_P" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 ++$as_echo "$MKDIR_P" >&6; } + + + # Checks for libraries. + + ++ ++ ++ ++ ++ + 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 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_path_PKG_CONFIG+:} false; then : ++ $as_echo_n "(cached) " >&6 + else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) +@@ -2820,14 +3219,14 @@ for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + ;; +@@ -2835,11 +3234,11 @@ esac + fi + PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then +- { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +-echo "${ECHO_T}$PKG_CONFIG" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 ++$as_echo "$PKG_CONFIG" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -2848,10 +3247,10 @@ 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 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : ++ $as_echo_n "(cached) " >&6 + else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) +@@ -2863,14 +3262,14 @@ for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + ;; +@@ -2878,11 +3277,11 @@ esac + fi + ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG + if test -n "$ac_pt_PKG_CONFIG"; then +- { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +-echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 ++$as_echo "$ac_pt_PKG_CONFIG" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_pt_PKG_CONFIG" = x; then +@@ -2890,12 +3289,8 @@ fi + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +-whose name does not start with the host triplet. If you think this +-configuration is useful to you, please write to autoconf@gnu.org." >&5 +-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +-whose name does not start with the host triplet. If you think this +-configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++{ $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 +@@ -2907,63 +3302,62 @@ fi + fi + if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 +- { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +-echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } ++ { $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 +- { echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + PKG_CONFIG="" + fi +- + fi + + pkg_failed=no +-{ echo "$as_me:$LINENO: checking for XML" >&5 +-echo $ECHO_N "checking for XML... $ECHO_C" >&6; } +- +-if test -n "$PKG_CONFIG"; then +- if test -n "$XML_CFLAGS"; then +- pkg_cv_XML_CFLAGS="$XML_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ +- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\"") >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML" >&5 ++$as_echo_n "checking for XML... " >&6; } ++ ++if test -n "$XML_CFLAGS"; then ++ pkg_cv_XML_CFLAGS="$XML_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then + pkg_cv_XML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$XML_LIBS"; then +- pkg_cv_XML_LIBS="$XML_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ +- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\"") >&5 ++if test -n "$XML_LIBS"; then ++ pkg_cv_XML_LIBS="$XML_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then + pkg_cv_XML_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + + + if test $pkg_failed = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + + if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +@@ -2971,74 +3365,70 @@ else + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- XML_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxml-2.0"` ++ XML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0" 2>&1` + else +- XML_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0"` ++ XML_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XML_PKG_ERRORS" >&5 + +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } +- { { echo "$as_me:$LINENO: error: 'Unable to find libxml2. Please make sure library and header files are installed.'" >&5 +-echo "$as_me: error: 'Unable to find libxml2. Please make sure library and header files are installed.'" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "'Unable to find libxml2. Please make sure library and header files are installed.'" "$LINENO" 5 + elif test $pkg_failed = untried; then +- { { echo "$as_me:$LINENO: error: 'Unable to find libxml2. Please make sure library and header files are installed.'" >&5 +-echo "$as_me: error: 'Unable to find libxml2. Please make sure library and header files are installed.'" >&2;} +- { (exit 1); exit 1; }; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ as_fn_error $? "'Unable to find libxml2. Please make sure library and header files are installed.'" "$LINENO" 5 + else + XML_CFLAGS=$pkg_cv_XML_CFLAGS + XML_LIBS=$pkg_cv_XML_LIBS +- { echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6; } +- : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ + fi + + pkg_failed=no +-{ echo "$as_me:$LINENO: checking for CURL" >&5 +-echo $ECHO_N "checking for CURL... $ECHO_C" >&6; } +- +-if test -n "$PKG_CONFIG"; then +- if test -n "$CURL_CFLAGS"; then +- pkg_cv_CURL_CFLAGS="$CURL_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ +- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libcurl\"") >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CURL" >&5 ++$as_echo_n "checking for CURL... " >&6; } ++ ++if test -n "$CURL_CFLAGS"; then ++ pkg_cv_CURL_CFLAGS="$CURL_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcurl") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then + pkg_cv_CURL_CFLAGS=`$PKG_CONFIG --cflags "libcurl" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$CURL_LIBS"; then +- pkg_cv_CURL_LIBS="$CURL_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ +- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libcurl\"") >&5 ++if test -n "$CURL_LIBS"; then ++ pkg_cv_CURL_LIBS="$CURL_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcurl") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then + pkg_cv_CURL_LIBS=`$PKG_CONFIG --libs "libcurl" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + + + if test $pkg_failed = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + + if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +@@ -3046,74 +3436,141 @@ else + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libcurl"` ++ CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcurl" 2>&1` + else +- CURL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libcurl"` ++ CURL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcurl" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CURL_PKG_ERRORS" >&5 + +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } +- { { echo "$as_me:$LINENO: error: 'Unable to find libcurl. Please make sure library and header files are installed.'" >&5 +-echo "$as_me: error: 'Unable to find libcurl. Please make sure library and header files are installed.'" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "'Unable to find libcurl. Please make sure library and header files are installed.'" "$LINENO" 5 + elif test $pkg_failed = untried; then +- { { echo "$as_me:$LINENO: error: 'Unable to find libcurl. Please make sure library and header files are installed.'" >&5 +-echo "$as_me: error: 'Unable to find libcurl. Please make sure library and header files are installed.'" >&2;} +- { (exit 1); exit 1; }; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ as_fn_error $? "'Unable to find libcurl. Please make sure library and header files are installed.'" "$LINENO" 5 + else + CURL_CFLAGS=$pkg_cv_CURL_CFLAGS + CURL_LIBS=$pkg_cv_CURL_LIBS +- { echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6; } +- : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ + fi + + pkg_failed=no +-{ echo "$as_me:$LINENO: checking for FUSE" >&5 +-echo $ECHO_N "checking for FUSE... $ECHO_C" >&6; } +- +-if test -n "$PKG_CONFIG"; then +- if test -n "$FUSE_CFLAGS"; then +- pkg_cv_FUSE_CFLAGS="$FUSE_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ +- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"fuse\"") >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUSE" >&5 ++$as_echo_n "checking for FUSE... " >&6; } ++ ++if test -n "$FUSE_CFLAGS"; then ++ pkg_cv_FUSE_CFLAGS="$FUSE_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fuse\""; } >&5 + ($PKG_CONFIG --exists --print-errors "fuse") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then + pkg_cv_FUSE_CFLAGS=`$PKG_CONFIG --cflags "fuse" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$FUSE_LIBS"; then +- pkg_cv_FUSE_LIBS="$FUSE_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ +- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"fuse\"") >&5 ++if test -n "$FUSE_LIBS"; then ++ pkg_cv_FUSE_LIBS="$FUSE_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fuse\""; } >&5 + ($PKG_CONFIG --exists --print-errors "fuse") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then + pkg_cv_FUSE_LIBS=`$PKG_CONFIG --libs "fuse" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes + fi +- fi ++ else ++ pkg_failed=untried ++fi ++ ++ ++ ++if test $pkg_failed = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ ++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 ++ FUSE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "fuse" 2>&1` ++ else ++ FUSE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "fuse" 2>&1` ++ fi ++ # Put the nasty error message in config.log where it belongs ++ echo "$FUSE_PKG_ERRORS" >&5 ++ ++ as_fn_error $? "'Unable to find libfuse. Please make sure library and header files are installed.'" "$LINENO" 5 ++elif test $pkg_failed = untried; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ as_fn_error $? "'Unable to find libfuse. Please make sure library and header files are installed.'" "$LINENO" 5 ++else ++ FUSE_CFLAGS=$pkg_cv_FUSE_CFLAGS ++ FUSE_LIBS=$pkg_cv_FUSE_LIBS ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ ++fi ++ ++pkg_failed=no ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5 ++$as_echo_n "checking for OPENSSL... " >&6; } ++ ++if test -n "$OPENSSL_CFLAGS"; then ++ pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes ++else ++ pkg_failed=yes ++fi ++ else ++ pkg_failed=untried ++fi ++if test -n "$OPENSSL_LIBS"; then ++ pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes + else +- pkg_failed=untried ++ pkg_failed=yes ++fi ++ else ++ pkg_failed=untried + fi + + + + if test $pkg_failed = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + + if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +@@ -3121,28 +3578,44 @@ else + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- FUSE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "fuse"` ++ OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl" 2>&1` + else +- FUSE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fuse"` ++ OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl" 2>&1` + fi + # Put the nasty error message in config.log where it belongs +- echo "$FUSE_PKG_ERRORS" >&5 ++ echo "$OPENSSL_PKG_ERRORS" >&5 ++ ++ as_fn_error $? "Package requirements (openssl) were not met: ++ ++$OPENSSL_PKG_ERRORS + +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } +- { { echo "$as_me:$LINENO: error: 'Unable to find libfuse. Please make sure library and header files are installed.'" >&5 +-echo "$as_me: error: 'Unable to find libfuse. Please make sure library and header files are installed.'" >&2;} +- { (exit 1); exit 1; }; } ++Consider adjusting the PKG_CONFIG_PATH environment variable if you ++installed software in a non-standard prefix. ++ ++Alternatively, you may set the environment variables OPENSSL_CFLAGS ++and OPENSSL_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 +- { { echo "$as_me:$LINENO: error: 'Unable to find libfuse. Please make sure library and header files are installed.'" >&5 +-echo "$as_me: error: 'Unable to find libfuse. Please make sure library and header files are installed.'" >&2;} +- { (exit 1); exit 1; }; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ { { $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 OPENSSL_CFLAGS ++and OPENSSL_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 +- FUSE_CFLAGS=$pkg_cv_FUSE_CFLAGS +- FUSE_LIBS=$pkg_cv_FUSE_LIBS +- { echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6; } +- : ++ OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS ++ OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ + fi + + # Checks for header files. +@@ -3152,15 +3625,15 @@ ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +-{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 ++$as_echo_n "checking how to run the C preprocessor... " >&6; } + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= + fi + if test -z "$CPP"; then +- if test "${ac_cv_prog_CPP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ if ${ac_cv_prog_CPP+:} false; then : ++ $as_echo_n "(cached) " >&6 + else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" +@@ -3174,11 +3647,7 @@ do + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #ifdef __STDC__ + # include +@@ -3187,76 +3656,34 @@ cat >>conftest.$ac_ext <<_ACEOF + #endif + Syntax error + _ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- : +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++if ac_fn_c_try_cpp "$LINENO"; then : + ++else + # Broken: fails on valid input. + continue + fi +- +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + _ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then ++if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. + continue + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- + # Passes both tests. + ac_preproc_ok=: + break + fi +- +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + + done + # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +-rm -f conftest.err conftest.$ac_ext +-if $ac_preproc_ok; then ++rm -f conftest.i conftest.err conftest.$ac_ext ++if $ac_preproc_ok; then : + break + fi + +@@ -3268,8 +3695,8 @@ fi + else + ac_cv_prog_CPP=$CPP + fi +-{ echo "$as_me:$LINENO: result: $CPP" >&5 +-echo "${ECHO_T}$CPP" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 ++$as_echo "$CPP" >&6; } + ac_preproc_ok=false + for ac_c_preproc_warn_flag in '' yes + do +@@ -3279,11 +3706,7 @@ do + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #ifdef __STDC__ + # include +@@ -3292,83 +3715,40 @@ cat >>conftest.$ac_ext <<_ACEOF + #endif + Syntax error + _ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- : +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++if ac_fn_c_try_cpp "$LINENO"; then : + ++else + # Broken: fails on valid input. + continue + fi +- +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + _ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then ++if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. + continue + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- + # Passes both tests. + ac_preproc_ok=: + break + fi +- +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + + done + # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +-rm -f conftest.err conftest.$ac_ext +-if $ac_preproc_ok; then +- : ++rm -f conftest.i conftest.err conftest.$ac_ext ++if $ac_preproc_ok; then : ++ + else +- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +-See \`config.log' for more details." >&5 +-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error $? "C preprocessor \"$CPP\" fails sanity check ++See \`config.log' for more details" "$LINENO" 5; } + fi + + ac_ext=c +@@ -3378,45 +3758,40 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +-{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +-echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +-if test "${ac_cv_path_GREP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- # Extract the first word of "grep ggrep" to use in msg output +-if test -z "$GREP"; then +-set dummy grep ggrep; ac_prog_name=$2 +-if test "${ac_cv_path_GREP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 ++$as_echo_n "checking for grep that handles long lines and -e... " >&6; } ++if ${ac_cv_path_GREP+:} false; then : ++ $as_echo_n "(cached) " >&6 + else ++ if test -z "$GREP"; then + ac_path_GREP_found=false +-# Loop through the user's path and test for each of PROGNAME-LIST +-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++ # Loop through the user's path and test for each of PROGNAME-LIST ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_prog in grep ggrep; do +- for ac_exec_ext in '' $ac_executable_extensions; do +- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" +- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +- # Check for GNU ac_path_GREP and select it if it is found. ++ for ac_prog in grep ggrep; do ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" ++ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue ++# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP + case `"$ac_path_GREP" --version 2>&1` in + *GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; + *) + ac_count=0 +- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" ++ $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" +- echo 'GREP' >> "conftest.nl" ++ $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break +- ac_count=`expr $ac_count + 1` ++ as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" +@@ -3428,77 +3803,61 @@ case `"$ac_path_GREP" --version 2>&1` in + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; + esac + +- +- $ac_path_GREP_found && break 3 ++ $ac_path_GREP_found && break 3 ++ done ++ done + done +-done +- +-done + IFS=$as_save_IFS +- +- +-fi +- +-GREP="$ac_cv_path_GREP" +-if test -z "$GREP"; then +- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} +- { (exit 1); exit 1; }; } +-fi +- ++ if test -z "$ac_cv_path_GREP"; then ++ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 ++ fi + else + ac_cv_path_GREP=$GREP + fi + +- + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +-echo "${ECHO_T}$ac_cv_path_GREP" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 ++$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +-{ echo "$as_me:$LINENO: checking for egrep" >&5 +-echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +-if test "${ac_cv_path_EGREP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 ++$as_echo_n "checking for egrep... " >&6; } ++if ${ac_cv_path_EGREP+:} false; then : ++ $as_echo_n "(cached) " >&6 + else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else +- # Extract the first word of "egrep" to use in msg output +-if test -z "$EGREP"; then +-set dummy egrep; ac_prog_name=$2 +-if test "${ac_cv_path_EGREP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else ++ if test -z "$EGREP"; then + ac_path_EGREP_found=false +-# Loop through the user's path and test for each of PROGNAME-LIST +-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++ # Loop through the user's path and test for each of PROGNAME-LIST ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_prog in egrep; do +- for ac_exec_ext in '' $ac_executable_extensions; do +- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" +- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +- # Check for GNU ac_path_EGREP and select it if it is found. ++ for ac_prog in egrep; do ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" ++ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue ++# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP + case `"$ac_path_EGREP" --version 2>&1` in + *GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; + *) + ac_count=0 +- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" ++ $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" +- echo 'EGREP' >> "conftest.nl" ++ $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break +- ac_count=`expr $ac_count + 1` ++ as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" +@@ -3510,46 +3869,31 @@ case `"$ac_path_EGREP" --version 2>&1` in + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; + esac + +- +- $ac_path_EGREP_found && break 3 ++ $ac_path_EGREP_found && break 3 ++ done ++ done + done +-done +- +-done + IFS=$as_save_IFS +- +- +-fi +- +-EGREP="$ac_cv_path_EGREP" +-if test -z "$EGREP"; then +- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} +- { (exit 1); exit 1; }; } +-fi +- ++ if test -z "$ac_cv_path_EGREP"; then ++ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 ++ fi + else + ac_cv_path_EGREP=$EGREP + fi + +- + fi + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +-echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 ++$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +-if test "${ac_cv_header_stdc+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 ++$as_echo_n "checking for ANSI C header files... " >&6; } ++if ${ac_cv_header_stdc+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -3564,47 +3908,23 @@ main () + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_header_stdc=no ++ ac_cv_header_stdc=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "memchr" >/dev/null 2>&1; then +- : ++ $EGREP "memchr" >/dev/null 2>&1; then : ++ + else + ac_cv_header_stdc=no + fi +@@ -3614,18 +3934,14 @@ fi + + if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "free" >/dev/null 2>&1; then +- : ++ $EGREP "free" >/dev/null 2>&1; then : ++ + else + ac_cv_header_stdc=no + fi +@@ -3635,14 +3951,10 @@ fi + + if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + : + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -3669,132 +3981,61 @@ main () + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- : +-else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++if ac_fn_c_try_run "$LINENO"; then : + +-( exit $ac_status ) +-ac_cv_header_stdc=no ++else ++ ac_cv_header_stdc=no + fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + +- + fi + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +-echo "${ECHO_T}$ac_cv_header_stdc" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 ++$as_echo "$ac_cv_header_stdc" >&6; } + if test $ac_cv_header_stdc = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define STDC_HEADERS 1 +-_ACEOF ++$as_echo "#define STDC_HEADERS 1" >>confdefs.h + + fi + + # On IRIX 5.3, sys/types and inttypes.h are conflicting. ++for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ ++ inttypes.h stdint.h unistd.h ++do : ++ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ++ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default ++" ++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++_ACEOF + ++fi + ++done + + ++ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" ++if test "x$ac_cv_type_size_t" = xyes; then : + +- +- +- +- +-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ +- inttypes.h stdint.h unistd.h +-do +-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +-{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +- +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- eval "$as_ac_Header=yes" + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_Header=no" +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-ac_res=`eval echo '${'$as_ac_Header'}'` +- { echo "$as_me:$LINENO: result: $ac_res" >&5 +-echo "${ECHO_T}$ac_res" >&6; } +-if test `eval echo '${'$as_ac_Header'}'` = yes; then +- cat >>confdefs.h <<_ACEOF +-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++cat >>confdefs.h <<_ACEOF ++#define size_t unsigned int + _ACEOF + + fi + +-done +- +- + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works + # for constant arguments. Useless! +-{ echo "$as_me:$LINENO: checking for working alloca.h" >&5 +-echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; } +-if test "${ac_cv_working_alloca_h+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 ++$as_echo_n "checking for working alloca.h... " >&6; } ++if ${ac_cv_working_alloca_h+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + int +@@ -3806,55 +4047,28 @@ char *p = (char *) alloca (2 * sizeof (int)); + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_working_alloca_h=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_working_alloca_h=no ++ ac_cv_working_alloca_h=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 +-echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 ++$as_echo "$ac_cv_working_alloca_h" >&6; } + if test $ac_cv_working_alloca_h = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_ALLOCA_H 1 +-_ACEOF ++$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h + + fi + +-{ echo "$as_me:$LINENO: checking for alloca" >&5 +-echo $ECHO_N "checking for alloca... $ECHO_C" >&6; } +-if test "${ac_cv_func_alloca_works+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 ++$as_echo_n "checking for alloca... " >&6; } ++if ${ac_cv_func_alloca_works+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #ifdef __GNUC__ + # define alloca __builtin_alloca +@@ -3870,7 +4084,7 @@ cat >>conftest.$ac_ext <<_ACEOF + #pragma alloca + # else + # ifndef alloca /* predefined by HP cc +Olibcalls */ +-char *alloca (); ++void *alloca (size_t); + # endif + # endif + # endif +@@ -3886,43 +4100,20 @@ char *p = (char *) alloca (1); + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_func_alloca_works=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_func_alloca_works=no ++ ac_cv_func_alloca_works=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 +-echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 ++$as_echo "$ac_cv_func_alloca_works" >&6; } + + if test $ac_cv_func_alloca_works = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_ALLOCA 1 +-_ACEOF ++$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h + + else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +@@ -3932,21 +4123,15 @@ else + + ALLOCA=\${LIBOBJDIR}alloca.$ac_objext + +-cat >>confdefs.h <<\_ACEOF +-#define C_ALLOCA 1 +-_ACEOF ++$as_echo "#define C_ALLOCA 1" >>confdefs.h + + +-{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 +-echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; } +-if test "${ac_cv_os_cray+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 ++$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } ++if ${ac_cv_os_cray+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #if defined CRAY && ! defined CRAY2 + webecray +@@ -3956,7 +4141,7 @@ wenotbecray + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "webecray" >/dev/null 2>&1; then ++ $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes + else + ac_cv_os_cray=no +@@ -3964,94 +4149,13 @@ fi + rm -f conftest* + + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 +-echo "${ECHO_T}$ac_cv_os_cray" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 ++$as_echo "$ac_cv_os_cray" >&6; } + if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do +- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then +- eval "$as_ac_var=yes" +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval echo '${'$as_ac_var'}'` +- { echo "$as_me:$LINENO: result: $ac_res" >&5 +-echo "${ECHO_T}$ac_res" >&6; } +-if test `eval echo '${'$as_ac_var'}'` = yes; then ++ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + + cat >>confdefs.h <<_ACEOF + #define CRAY_STACKSEG_END $ac_func +@@ -4063,19 +4167,15 @@ fi + done + fi + +-{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 +-echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; } +-if test "${ac_cv_c_stack_direction+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 ++$as_echo_n "checking stack direction for C alloca... " >&6; } ++if ${ac_cv_c_stack_direction+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + ac_cv_c_stack_direction=0 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + $ac_includes_default + int +@@ -4098,43 +4198,18 @@ main () + return find_stack_direction () < 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_stack_direction=1 +-else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-ac_cv_c_stack_direction=-1 ++else ++ ac_cv_c_stack_direction=-1 + fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + +- + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 +-echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; } +- ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 ++$as_echo "$ac_cv_c_stack_direction" >&6; } + cat >>confdefs.h <<_ACEOF + #define STACK_DIRECTION $ac_cv_c_stack_direction + _ACEOF +@@ -4142,16 +4217,12 @@ _ACEOF + + fi + +-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +-if test "${ac_cv_header_stdc+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 ++$as_echo_n "checking for ANSI C header files... " >&6; } ++if ${ac_cv_header_stdc+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -4166,47 +4237,23 @@ main () + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_header_stdc=no ++ ac_cv_header_stdc=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "memchr" >/dev/null 2>&1; then +- : ++ $EGREP "memchr" >/dev/null 2>&1; then : ++ + else + ac_cv_header_stdc=no + fi +@@ -4216,18 +4263,14 @@ fi + + if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "free" >/dev/null 2>&1; then +- : ++ $EGREP "free" >/dev/null 2>&1; then : ++ + else + ac_cv_header_stdc=no + fi +@@ -4237,14 +4280,10 @@ fi + + if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + : + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -4271,358 +4310,54 @@ main () + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- : +-else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++if ac_fn_c_try_run "$LINENO"; then : + +-( exit $ac_status ) +-ac_cv_header_stdc=no ++else ++ ac_cv_header_stdc=no + fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + +- + fi + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +-echo "${ECHO_T}$ac_cv_header_stdc" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 ++$as_echo "$ac_cv_header_stdc" >&6; } + if test $ac_cv_header_stdc = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define STDC_HEADERS 1 +-_ACEOF ++$as_echo "#define STDC_HEADERS 1" >>confdefs.h + + fi + +- +- +- +- +- +- +- +- +- +- +- +- + for ac_header in fcntl.h stdint.h stddef.h stdlib.h string.h strings.h sys/time.h unistd.h pthread.h fuse.h curl/curl.h libxml/tree.h +-do +-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-fi +-ac_res=`eval echo '${'$as_ac_Header'}'` +- { echo "$as_me:$LINENO: result: $ac_res" >&5 +-echo "${ECHO_T}$ac_res" >&6; } +-else +- # Is the header compilable? +-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-echo "${ECHO_T}$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-echo "${ECHO_T}$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ---------------------------------------------------- ## +-## Report this to Michael Barton ## +-## ---------------------------------------------------- ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval echo '${'$as_ac_Header'}'` +- { echo "$as_me:$LINENO: result: $ac_res" >&5 +-echo "${ECHO_T}$ac_res" >&6; } +- +-fi +-if test `eval echo '${'$as_ac_Header'}'` = yes; then ++do : ++ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" ++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF + + fi + + done + +-if test "${ac_cv_header_openssl_crypto_h+set}" = set; then +- { echo "$as_me:$LINENO: checking for openssl/crypto.h" >&5 +-echo $ECHO_N "checking for openssl/crypto.h... $ECHO_C" >&6; } +-if test "${ac_cv_header_openssl_crypto_h+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-fi +-{ echo "$as_me:$LINENO: result: $ac_cv_header_openssl_crypto_h" >&5 +-echo "${ECHO_T}$ac_cv_header_openssl_crypto_h" >&6; } +-else +- # Is the header compilable? +-{ echo "$as_me:$LINENO: checking openssl/crypto.h usability" >&5 +-echo $ECHO_N "checking openssl/crypto.h usability... $ECHO_C" >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-echo "${ECHO_T}$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ echo "$as_me:$LINENO: checking openssl/crypto.h presence" >&5 +-echo $ECHO_N "checking openssl/crypto.h presence... $ECHO_C" >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-echo "${ECHO_T}$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { echo "$as_me:$LINENO: WARNING: openssl/crypto.h: accepted by the compiler, rejected by the preprocessor!" >&5 +-echo "$as_me: WARNING: openssl/crypto.h: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { echo "$as_me:$LINENO: WARNING: openssl/crypto.h: proceeding with the compiler's result" >&5 +-echo "$as_me: WARNING: openssl/crypto.h: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { echo "$as_me:$LINENO: WARNING: openssl/crypto.h: present but cannot be compiled" >&5 +-echo "$as_me: WARNING: openssl/crypto.h: present but cannot be compiled" >&2;} +- { echo "$as_me:$LINENO: WARNING: openssl/crypto.h: check for missing prerequisite headers?" >&5 +-echo "$as_me: WARNING: openssl/crypto.h: check for missing prerequisite headers?" >&2;} +- { echo "$as_me:$LINENO: WARNING: openssl/crypto.h: see the Autoconf documentation" >&5 +-echo "$as_me: WARNING: openssl/crypto.h: see the Autoconf documentation" >&2;} +- { echo "$as_me:$LINENO: WARNING: openssl/crypto.h: section \"Present But Cannot Be Compiled\"" >&5 +-echo "$as_me: WARNING: openssl/crypto.h: section \"Present But Cannot Be Compiled\"" >&2;} +- { echo "$as_me:$LINENO: WARNING: openssl/crypto.h: proceeding with the preprocessor's result" >&5 +-echo "$as_me: WARNING: openssl/crypto.h: proceeding with the preprocessor's result" >&2;} +- { echo "$as_me:$LINENO: WARNING: openssl/crypto.h: in the future, the compiler will take precedence" >&5 +-echo "$as_me: WARNING: openssl/crypto.h: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ---------------------------------------------------- ## +-## Report this to Michael Barton ## +-## ---------------------------------------------------- ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ echo "$as_me:$LINENO: checking for openssl/crypto.h" >&5 +-echo $ECHO_N "checking for openssl/crypto.h... $ECHO_C" >&6; } +-if test "${ac_cv_header_openssl_crypto_h+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- ac_cv_header_openssl_crypto_h=$ac_header_preproc +-fi +-{ echo "$as_me:$LINENO: result: $ac_cv_header_openssl_crypto_h" >&5 +-echo "${ECHO_T}$ac_cv_header_openssl_crypto_h" >&6; } +- +-fi +-if test $ac_cv_header_openssl_crypto_h = yes; then ++ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default" ++if test "x$ac_cv_header_openssl_crypto_h" = xyes; then : + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_OPENSSL +-_ACEOF ++$as_echo "#define HAVE_OPENSSL /**/" >>confdefs.h + + fi + + + + # Checks for typedefs, structures, and compiler characteristics. +-{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } +-if test "${ac_cv_c_const+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 ++$as_echo_n "checking for an ANSI C-conforming const... " >&6; } ++if ${ac_cv_c_const+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -4682,59 +4417,33 @@ main () + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_const=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_c_const=no ++ ac_cv_c_const=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +-echo "${ECHO_T}$ac_cv_c_const" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 ++$as_echo "$ac_cv_c_const" >&6; } + if test $ac_cv_c_const = no; then + +-cat >>confdefs.h <<\_ACEOF +-#define const +-_ACEOF ++$as_echo "#define const /**/" >>confdefs.h + + fi + +-{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +-echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } +-if test "${ac_cv_type_uid_t+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 ++$as_echo_n "checking for uid_t in sys/types.h... " >&6; } ++if ${ac_cv_type_uid_t+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "uid_t" >/dev/null 2>&1; then ++ $EGREP "uid_t" >/dev/null 2>&1; then : + ac_cv_type_uid_t=yes + else + ac_cv_type_uid_t=no +@@ -4742,76 +4451,20 @@ fi + rm -f conftest* + + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +-echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 ++$as_echo "$ac_cv_type_uid_t" >&6; } + if test $ac_cv_type_uid_t = no; then + +-cat >>confdefs.h <<\_ACEOF +-#define uid_t int +-_ACEOF ++$as_echo "#define uid_t int" >>confdefs.h + + +-cat >>confdefs.h <<\_ACEOF +-#define gid_t int +-_ACEOF ++$as_echo "#define gid_t int" >>confdefs.h + + fi + +-{ echo "$as_me:$LINENO: checking for mode_t" >&5 +-echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } +-if test "${ac_cv_type_mode_t+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-typedef mode_t ac__type_new_; +-int +-main () +-{ +-if ((ac__type_new_ *) 0) +- return 0; +-if (sizeof (ac__type_new_)) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_type_mode_t=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_type_mode_t=no +-fi ++ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" ++if test "x$ac_cv_type_mode_t" = xyes; then : + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +-echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } +-if test $ac_cv_type_mode_t = yes; then +- : + else + + cat >>confdefs.h <<_ACEOF +@@ -4820,61 +4473,9 @@ _ACEOF + + fi + +-{ echo "$as_me:$LINENO: checking for off_t" >&5 +-echo $ECHO_N "checking for off_t... $ECHO_C" >&6; } +-if test "${ac_cv_type_off_t+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-typedef off_t ac__type_new_; +-int +-main () +-{ +-if ((ac__type_new_ *) 0) +- return 0; +-if (sizeof (ac__type_new_)) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_type_off_t=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_type_off_t=no +-fi ++ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" ++if test "x$ac_cv_type_off_t" = xyes; then : + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 +-echo "${ECHO_T}$ac_cv_type_off_t" >&6; } +-if test $ac_cv_type_off_t = yes; then +- : + else + + cat >>confdefs.h <<_ACEOF +@@ -4883,61 +4484,9 @@ _ACEOF + + fi + +-{ echo "$as_me:$LINENO: checking for size_t" >&5 +-echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +-if test "${ac_cv_type_size_t+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-typedef size_t ac__type_new_; +-int +-main () +-{ +-if ((ac__type_new_ *) 0) +- return 0; +-if (sizeof (ac__type_new_)) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_type_size_t=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_type_size_t=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +-echo "${ECHO_T}$ac_cv_type_size_t" >&6; } +-if test $ac_cv_type_size_t = yes; then +- : ++ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" ++if test "x$ac_cv_type_size_t" = xyes; then : ++ + else + + cat >>confdefs.h <<_ACEOF +@@ -4946,16 +4495,12 @@ _ACEOF + + fi + +-{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +-echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } +-if test "${ac_cv_struct_tm+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 ++$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } ++if ${ac_cv_struct_tm+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -4965,151 +4510,35 @@ main () + { + struct tm tm; + int *p = &tm.tm_sec; +- return !p; ++ return !p; + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_tm=time.h + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_struct_tm=sys/time.h ++ ac_cv_struct_tm=sys/time.h + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +-echo "${ECHO_T}$ac_cv_struct_tm" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 ++$as_echo "$ac_cv_struct_tm" >&6; } + if test $ac_cv_struct_tm = sys/time.h; then + +-cat >>confdefs.h <<\_ACEOF +-#define TM_IN_SYS_TIME 1 +-_ACEOF +- +-fi +- +-{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 +-echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; } +-if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-static struct stat ac_aggr; +-if (ac_aggr.st_blocks) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_blocks=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-static struct stat ac_aggr; +-if (sizeof ac_aggr.st_blocks) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_blocks=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_member_struct_stat_st_blocks=no +-fi ++$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 +-echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; } +-if test $ac_cv_member_struct_stat_st_blocks = yes; then ++ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" ++if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : + + cat >>confdefs.h <<_ACEOF + #define HAVE_STRUCT_STAT_ST_BLOCKS 1 + _ACEOF + + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_ST_BLOCKS 1 +-_ACEOF ++$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h + + else + case " $LIBOBJS " in +@@ -5123,164 +4552,27 @@ fi + + + # Checks for library functions. +- + for ac_header in stdlib.h +-do +-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-fi +-ac_res=`eval echo '${'$as_ac_Header'}'` +- { echo "$as_me:$LINENO: result: $ac_res" >&5 +-echo "${ECHO_T}$ac_res" >&6; } +-else +- # Is the header compilable? +-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-echo "${ECHO_T}$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-echo "${ECHO_T}$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ---------------------------------------------------- ## +-## Report this to Michael Barton ## +-## ---------------------------------------------------- ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval echo '${'$as_ac_Header'}'` +- { echo "$as_me:$LINENO: result: $ac_res" >&5 +-echo "${ECHO_T}$ac_res" >&6; } +- +-fi +-if test `eval echo '${'$as_ac_Header'}'` = yes; then ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" ++if test "x$ac_cv_header_stdlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++#define HAVE_STDLIB_H 1 + _ACEOF + + fi + + done + +-{ echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 +-echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6; } +-if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 ++$as_echo_n "checking for GNU libc compatible malloc... " >&6; } ++if ${ac_cv_func_malloc_0_nonnull+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + ac_cv_func_malloc_0_nonnull=no + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #if defined STDC_HEADERS || defined HAVE_STDLIB_H + # include +@@ -5296,380 +4588,88 @@ return ! malloc (0); + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_malloc_0_nonnull=yes + else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-ac_cv_func_malloc_0_nonnull=no +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +-fi +-{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 +-echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6; } +-if test $ac_cv_func_malloc_0_nonnull = yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_MALLOC 1 +-_ACEOF +- +-else +- cat >>confdefs.h <<\_ACEOF +-#define HAVE_MALLOC 0 +-_ACEOF +- +- case " $LIBOBJS " in +- *" malloc.$ac_objext "* ) ;; +- *) LIBOBJS="$LIBOBJS malloc.$ac_objext" +- ;; +-esac +- +- +-cat >>confdefs.h <<\_ACEOF +-#define malloc rpl_malloc +-_ACEOF +- +-fi +- +- +- +-{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +-echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } +-if test "${ac_cv_header_time+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-#include +-#include +- +-int +-main () +-{ +-if ((struct tm *) 0) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_header_time=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_header_time=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +-echo "${ECHO_T}$ac_cv_header_time" >&6; } +-if test $ac_cv_header_time = yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define TIME_WITH_SYS_TIME 1 +-_ACEOF +- +-fi +- +- +- +- +- +-for ac_header in $ac_header_list +-do +-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-fi +-ac_res=`eval echo '${'$as_ac_Header'}'` +- { echo "$as_me:$LINENO: result: $ac_res" >&5 +-echo "${ECHO_T}$ac_res" >&6; } +-else +- # Is the header compilable? +-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-echo "${ECHO_T}$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-echo "${ECHO_T}$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ---------------------------------------------------- ## +-## Report this to Michael Barton ## +-## ---------------------------------------------------- ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" ++ ac_cv_func_malloc_0_nonnull=no + fi +-ac_res=`eval echo '${'$as_ac_Header'}'` +- { echo "$as_me:$LINENO: result: $ac_res" >&5 +-echo "${ECHO_T}$ac_res" >&6; } +- ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext + fi +-if test `eval echo '${'$as_ac_Header'}'` = yes; then +- cat >>confdefs.h <<_ACEOF +-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +-_ACEOF + + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 ++$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } ++if test $ac_cv_func_malloc_0_nonnull = yes; then : + +-done +- +- ++$as_echo "#define HAVE_MALLOC 1" >>confdefs.h + ++else ++ $as_echo "#define HAVE_MALLOC 0" >>confdefs.h + ++ case " $LIBOBJS " in ++ *" malloc.$ac_objext "* ) ;; ++ *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ++ ;; ++esac + + ++$as_echo "#define malloc rpl_malloc" >>confdefs.h + ++fi + + +-for ac_func in $ac_func_list +-do +-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 ++$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } ++if ${ac_cv_header_time+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif ++#include ++#include ++#include + + int + main () + { +-return $ac_func (); ++if ((struct tm *) 0) ++return 0; + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then +- eval "$as_ac_var=yes" ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_header_time=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" ++ ac_cv_header_time=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 ++$as_echo "$ac_cv_header_time" >&6; } ++if test $ac_cv_header_time = yes; then ++ ++$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h + +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext + fi +-ac_res=`eval echo '${'$as_ac_var'}'` +- { echo "$as_me:$LINENO: result: $ac_res" >&5 +-echo "${ECHO_T}$ac_res" >&6; } +-if test `eval echo '${'$as_ac_var'}'` = yes; then ++ ++ ++ ++ ++ for ac_header in $ac_header_list ++do : ++ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ++ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default ++" ++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF + + fi +-done +- +- + ++done + + + +@@ -5678,25 +4678,31 @@ done + + + ++ for ac_func in $ac_func_list ++do : ++ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++_ACEOF + ++fi ++done + + + + + +-{ echo "$as_me:$LINENO: checking for working mktime" >&5 +-echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; } +-if test "${ac_cv_func_working_mktime+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 ++$as_echo_n "checking for working mktime... " >&6; } ++if ${ac_cv_func_working_mktime+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + ac_cv_func_working_mktime=no + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + /* Test program from Paul Eggert and Tony Leneis. */ + #ifdef TIME_WITH_SYS_TIME +@@ -5728,8 +4734,8 @@ static time_t time_t_max; + static time_t time_t_min; + + /* Values we'll use to set the TZ environment variable. */ +-static char *tz_strings[] = { +- (char *) 0, "TZ=GMT0", "TZ=JST-9", ++static const char *tz_strings[] = { ++ (const char *) 0, "TZ=GMT0", "TZ=JST-9", + "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" + }; + #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) +@@ -5746,7 +4752,7 @@ spring_forward_gap () + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ +- putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); ++ putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); + + tm.tm_year = 98; + tm.tm_mon = 3; +@@ -5759,16 +4765,14 @@ spring_forward_gap () + } + + static int +-mktime_test1 (now) +- time_t now; ++mktime_test1 (time_t now) + { + struct tm *lt; + return ! (lt = localtime (&now)) || mktime (lt) == now; + } + + static int +-mktime_test (now) +- time_t now; ++mktime_test (time_t now) + { + return (mktime_test1 (now) + && mktime_test1 ((time_t) (time_t_max - now)) +@@ -5792,8 +4796,7 @@ irix_6_4_bug () + } + + static int +-bigtime_test (j) +- int j; ++bigtime_test (int j) + { + struct tm tm; + time_t now; +@@ -5837,7 +4840,7 @@ year_2050_test () + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ +- putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); ++ putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); + + t = mktime (&tm); + +@@ -5872,7 +4875,7 @@ main () + for (i = 0; i < N_STRINGS; i++) + { + if (tz_strings[i]) +- putenv (tz_strings[i]); ++ putenv ((char*) tz_strings[i]); + + for (t = 0; t <= time_t_max - delta; t += delta) + if (! mktime_test (t)) +@@ -5893,42 +4896,18 @@ main () + return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_working_mktime=yes + else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-ac_cv_func_working_mktime=no ++ ac_cv_func_working_mktime=no + fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + +- + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5 +-echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 ++$as_echo "$ac_cv_func_working_mktime" >&6; } + if test $ac_cv_func_working_mktime = no; then + case " $LIBOBJS " in + *" mktime.$ac_objext "* ) ;; +@@ -5938,16 +4917,12 @@ esac + + fi + +-{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +-echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } +-if test "${ac_cv_type_signal+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 ++$as_echo_n "checking return type of signal handlers... " >&6; } ++if ${ac_cv_type_signal+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -5960,218 +4935,33 @@ return *(signal (0, 0)) (0) == 1; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_signal=int + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_type_signal=void ++ ac_cv_type_signal=void + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +-echo "${ECHO_T}$ac_cv_type_signal" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 ++$as_echo "$ac_cv_type_signal" >&6; } + + cat >>confdefs.h <<_ACEOF + #define RETSIGTYPE $ac_cv_type_signal + _ACEOF + + +- + for ac_func in vprintf +-do +-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then +- eval "$as_ac_var=yes" +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval echo '${'$as_ac_var'}'` +- { echo "$as_me:$LINENO: result: $ac_res" >&5 +-echo "${ECHO_T}$ac_res" >&6; } +-if test `eval echo '${'$as_ac_var'}'` = yes; then ++do : ++ ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" ++if test "x$ac_cv_func_vprintf" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF +- +-{ echo "$as_me:$LINENO: checking for _doprnt" >&5 +-echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; } +-if test "${ac_cv_func__doprnt+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define _doprnt to an innocuous variant, in case declares _doprnt. +- For example, HP-UX 11i declares gettimeofday. */ +-#define _doprnt innocuous__doprnt +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char _doprnt (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef _doprnt +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char _doprnt (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub__doprnt || defined __stub____doprnt +-choke me +-#endif +- +-int +-main () +-{ +-return _doprnt (); +- ; +- return 0; +-} ++#define HAVE_VPRINTF 1 + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then +- ac_cv_func__doprnt=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_func__doprnt=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-{ echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 +-echo "${ECHO_T}$ac_cv_func__doprnt" >&6; } +-if test $ac_cv_func__doprnt = yes; then ++ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" ++if test "x$ac_cv_func__doprnt" = xyes; then : + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_DOPRNT 1 +-_ACEOF ++$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h + + fi + +@@ -6179,102 +4969,13 @@ fi + done + + +- +- +- +- +- +- +- +- + for ac_func in ftruncate memmove strcasecmp strchr strdup strncasecmp strrchr strstr +-do +-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then +- eval "$as_ac_var=yes" +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval echo '${'$as_ac_var'}'` +- { echo "$as_me:$LINENO: result: $ac_res" >&5 +-echo "${ECHO_T}$ac_res" >&6; } +-if test `eval echo '${'$as_ac_var'}'` = yes; then ++do : ++ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF + + fi +@@ -6308,12 +5009,13 @@ _ACEOF + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( +- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; ++ *_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) ;; #( +- *) $as_unset $ac_var ;; ++ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( ++ *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done +@@ -6321,8 +5023,8 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) +- # `set' does not quote correctly, so add quotes (double-quote +- # substitution turns \\\\ into \\, and sed turns \\ into \). ++ # `set' does not quote correctly, so add quotes: double-quote ++ # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" +@@ -6344,13 +5046,24 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + :end' >>confcache + if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then +- test "x$cache_file" != "x/dev/null" && +- { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +-echo "$as_me: updating cache $cache_file" >&6;} +- cat confcache >$cache_file ++ if test "x$cache_file" != "x/dev/null"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 ++$as_echo "$as_me: updating cache $cache_file" >&6;} ++ if test ! -f "$cache_file" || test -h "$cache_file"; then ++ cat confcache >"$cache_file" ++ else ++ case $cache_file in #( ++ */* | ?:*) ++ mv -f confcache "$cache_file"$$ && ++ mv -f "$cache_file"$$ "$cache_file" ;; #( ++ *) ++ mv -f confcache "$cache_file" ;; ++ esac ++ fi ++ fi + else +- { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +-echo "$as_me: not updating unwritable cache $cache_file" >&6;} ++ { $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 +@@ -6363,14 +5076,15 @@ DEFS=-DHAVE_CONFIG_H + + ac_libobjs= + ac_ltlibobjs= ++U= + for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' +- ac_i=`echo "$ac_i" | sed "$ac_script"` ++ ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. +- ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" +- ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' ++ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" ++ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' + done + LIBOBJS=$ac_libobjs + +@@ -6378,12 +5092,14 @@ LTLIBOBJS=$ac_ltlibobjs + + + +-: ${CONFIG_STATUS=./config.status} ++: "${CONFIG_STATUS=./config.status}" ++ac_write_fail=0 + ac_clean_files_save=$ac_clean_files + ac_clean_files="$ac_clean_files $CONFIG_STATUS" +-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +-echo "$as_me: creating $CONFIG_STATUS" >&6;} +-cat >$CONFIG_STATUS <<_ACEOF ++{ $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. +@@ -6393,59 +5109,79 @@ cat >$CONFIG_STATUS <<_ACEOF + debug=false + ac_cs_recheck=false + ac_cs_silent=false +-SHELL=\${CONFIG_SHELL-$SHELL} +-_ACEOF + +-cat >>$CONFIG_STATUS <<\_ACEOF +-## --------------------- ## +-## M4sh Initialization. ## +-## --------------------- ## ++SHELL=\${CONFIG_SHELL-$SHELL} ++export SHELL ++_ASEOF ++cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ++## -------------------- ## ++## M4sh Initialization. ## ++## -------------------- ## + + # Be more Bourne compatible + DUALCASE=1; export DUALCASE # for MKS sh +-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: +- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ++ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST + else +- case `(set -o) 2>/dev/null` in +- *posix*) set -o posix ;; ++ case `(set -o) 2>/dev/null` in #( ++ *posix*) : ++ set -o posix ;; #( ++ *) : ++ ;; + esac +- + fi + + +- +- +-# PATH needs CR +-# Avoid depending upon Character Ranges. +-as_cr_letters='abcdefghijklmnopqrstuvwxyz' +-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +-as_cr_Letters=$as_cr_letters$as_cr_LETTERS +-as_cr_digits='0123456789' +-as_cr_alnum=$as_cr_Letters$as_cr_digits +- +-# The user is always right. +-if test "${PATH_SEPARATOR+set}" != set; then +- echo "#! /bin/sh" >conf$$.sh +- echo "exit 0" >>conf$$.sh +- chmod +x conf$$.sh +- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then +- PATH_SEPARATOR=';' ++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 +- PATH_SEPARATOR=: ++ 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 +- rm -f conf$$.sh ++ export as_echo_body ++ as_echo='sh -c $as_echo_body as_echo' + fi + +-# Support unset when possible. +-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +- as_unset=unset +-else +- as_unset=false ++# 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 + + +@@ -6454,20 +5190,19 @@ fi + # 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.) +-as_nl=' +-' + IFS=" "" $as_nl" + + # Find who we are. Look in the path if we contain no directory separator. +-case $0 in ++as_myself= ++case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +-done ++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ++ done + IFS=$as_save_IFS + + ;; +@@ -6478,32 +5213,111 @@ if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then +- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 +- { (exit 1); exit 1; } ++ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 ++ exit 1 + fi + +-# Work around bugs in pre-3.0 UWIN ksh. +-for as_var in ENV MAIL MAILPATH +-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++# Unset variables that we do not need and which cause bugs (e.g. in ++# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" ++# suppresses any "Segmentation fault" message there. '((' could ++# trigger a bug in pdksh 5.2.14. ++for as_var in BASH_ENV ENV MAIL MAILPATH ++do eval test x\${$as_var+set} = xset \ ++ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : + done + PS1='$ ' + PS2='> ' + PS4='+ ' + + # NLS nuisances. +-for as_var in \ +- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ +- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ +- LC_TELEPHONE LC_TIME +-do +- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then +- eval $as_var=C; export $as_var +- else +- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++LC_ALL=C ++export LC_ALL ++LANGUAGE=C ++export LANGUAGE ++ ++# CDPATH. ++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH ++ ++ ++# as_fn_error STATUS ERROR [LINENO LOG_FD] ++# ---------------------------------------- ++# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are ++# provided, also output the error to LOG_FD, referencing LINENO. Then exit the ++# script with STATUS, using 1 if that was 0. ++as_fn_error () ++{ ++ as_status=$1; test $as_status -eq 0 && as_status=1 ++ if test "$4"; then ++ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi +-done ++ $as_echo "$as_me: error: $2" >&2 ++ as_fn_exit $as_status ++} # as_fn_error ++ ++ ++# as_fn_set_status STATUS ++# ----------------------- ++# Set $? to STATUS, without forking. ++as_fn_set_status () ++{ ++ return $1 ++} # as_fn_set_status ++ ++# as_fn_exit STATUS ++# ----------------- ++# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. ++as_fn_exit () ++{ ++ set +e ++ as_fn_set_status $1 ++ exit $1 ++} # as_fn_exit ++ ++# as_fn_unset VAR ++# --------------- ++# Portably unset VAR. ++as_fn_unset () ++{ ++ { eval $1=; unset $1;} ++} ++as_unset=as_fn_unset ++# as_fn_append VAR VALUE ++# ---------------------- ++# Append the text in VALUE to the end of the definition contained in VAR. Take ++# advantage of any shell optimizations that allow amortized linear growth over ++# repeated appends, instead of the typical quadratic growth present in naive ++# implementations. ++if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : ++ eval 'as_fn_append () ++ { ++ eval $1+=\$2 ++ }' ++else ++ as_fn_append () ++ { ++ eval $1=\$$1\$2 ++ } ++fi # as_fn_append ++ ++# as_fn_arith ARG... ++# ------------------ ++# Perform arithmetic evaluation on the ARGs, and store the result in the ++# global $as_val. Take advantage of shells that can avoid forks. The arguments ++# must be portable across $(()) and expr. ++if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : ++ eval 'as_fn_arith () ++ { ++ as_val=$(( $* )) ++ }' ++else ++ as_fn_arith () ++ { ++ as_val=`expr "$@" || test $? -eq 1` ++ } ++fi # as_fn_arith ++ + +-# Required to use basename. + if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +@@ -6517,13 +5331,17 @@ else + as_basename=false + fi + ++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then ++ as_dirname=dirname ++else ++ as_dirname=false ++fi + +-# Name of the executable. + as_me=`$as_basename -- "$0" || + $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +-echo X/"$0" | ++$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q +@@ -6538,104 +5356,103 @@ echo X/"$0" | + } + s/.*/./; q'` + +-# CDPATH. +-$as_unset CDPATH +- +- +- +- as_lineno_1=$LINENO +- as_lineno_2=$LINENO +- test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { +- +- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO +- # uniformly replaced by the line number. The first 'sed' inserts a +- # line-number line after each line using $LINENO; the second 'sed' +- # does the real work. The second script uses 'N' to pair each +- # line-number line with the line containing $LINENO, and appends +- # trailing '-' during substitution so that $LINENO is not a special +- # case at line end. +- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the +- # scripts with optimization help from Paolo Bonzini. Blame Lee +- # E. McMahon (1931-1989) for sed's syntax. :-) +- sed -n ' +- p +- /[$]LINENO/= +- ' <$as_myself | +- sed ' +- s/[$]LINENO.*/&-/ +- t lineno +- b +- :lineno +- N +- :loop +- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ +- t loop +- s/-\n.*// +- ' >$as_me.lineno && +- chmod +x "$as_me.lineno" || +- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 +- { (exit 1); exit 1; }; } +- +- # Don't try to exec as it changes $[0], causing all sort of problems +- # (the dirname of $[0] is not the place where we might find the +- # original and so on. Autoconf is especially sensitive to this). +- . "./$as_me.lineno" +- # Exit status is that of the last command. +- exit +-} +- +- +-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then +- as_dirname=dirname +-else +- as_dirname=false +-fi ++# Avoid depending upon Character Ranges. ++as_cr_letters='abcdefghijklmnopqrstuvwxyz' ++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ++as_cr_Letters=$as_cr_letters$as_cr_LETTERS ++as_cr_digits='0123456789' ++as_cr_alnum=$as_cr_Letters$as_cr_digits + + ECHO_C= ECHO_N= ECHO_T= +-case `echo -n x` in ++case `echo -n x` in #((((( + -n*) +- case `echo 'x\c'` in ++ case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. +- *) ECHO_C='\c';; ++ xy) ECHO_C='\c';; ++ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ++ ECHO_T=' ';; + esac;; + *) + ECHO_N='-n';; + esac + +-if expr a : '\(a\)' >/dev/null 2>&1 && +- test "X`expr 00001 : '.*\(...\)'`" = X001; then +- as_expr=expr +-else +- as_expr=false +-fi +- + rm -f conf$$ conf$$.exe conf$$.file + if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file + else + rm -f conf$$.dir +- mkdir conf$$.dir +-fi +-echo >conf$$.file +-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 || ++ 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' +-elif ln conf$$.file conf$$ 2>/dev/null; then +- as_ln_s=ln ++ 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=: ++ as_mkdir_p='mkdir -p "$as_dir"' + else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +@@ -6652,12 +5469,12 @@ else + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then +- test -d "$1/."; ++ test -d "$1/."; + else +- case $1 in +- -*)set "./$1";; ++ case $1 in #( ++ -*)set "./$1";; + esac; +- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ++ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +@@ -6672,13 +5489,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + exec 6>&1 ++## ----------------------------------- ## ++## Main body of $CONFIG_STATUS script. ## ++## ----------------------------------- ## ++_ASEOF ++test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +-# Save the log message, to keep $[0] and so on meaningful, and to ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ++# Save the log message, to keep $0 and so on meaningful, and to + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" + This file was extended by cloudfuse $as_me 0.9, which was +-generated by GNU Autoconf 2.61. Invocation command line was ++generated by GNU Autoconf 2.68. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS +@@ -6691,29 +5514,41 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q` + + _ACEOF + +-cat >>$CONFIG_STATUS <<_ACEOF ++case $ac_config_files in *" ++"*) set x $ac_config_files; shift; ac_config_files=$*;; ++esac ++ ++case $ac_config_headers in *" ++"*) set x $ac_config_headers; shift; ac_config_headers=$*;; ++esac ++ ++ ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + # Files that config.status was made for. + config_files="$ac_config_files" + config_headers="$ac_config_headers" + + _ACEOF + +-cat >>$CONFIG_STATUS <<\_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + ac_cs_usage="\ +-\`$as_me' instantiates files from templates according to the +-current configuration. ++\`$as_me' instantiates files and other configuration actions ++from templates according to the current configuration. Unless the files ++and actions are specified as TAGs, all are instantiated by default. + +-Usage: $0 [OPTIONS] [FILE]... ++Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit +- -q, --quiet do not print progress messages ++ --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 +- --header=FILE[:TEMPLATE] +- instantiate the configuration header FILE ++ --file=FILE[:TEMPLATE] ++ instantiate the configuration file FILE ++ --header=FILE[:TEMPLATE] ++ instantiate the configuration header FILE + + Configuration files: + $config_files +@@ -6721,16 +5556,17 @@ $config_files + Configuration headers: + $config_headers + +-Report bugs to ." ++Report bugs to >." + + _ACEOF +-cat >>$CONFIG_STATUS <<_ACEOF ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ++ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ + cloudfuse config.status 0.9 +-configured by $0, generated by GNU Autoconf 2.61, +- with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" ++configured by $0, generated by GNU Autoconf 2.68, ++ with options \\"\$ac_cs_config\\" + +-Copyright (C) 2006 Free Software Foundation, Inc. ++Copyright (C) 2010 Free Software Foundation, Inc. + This config.status script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it." + +@@ -6738,20 +5574,25 @@ ac_pwd='$ac_pwd' + srcdir='$srcdir' + INSTALL='$INSTALL' + MKDIR_P='$MKDIR_P' ++test -n "\$AWK" || AWK=awk + _ACEOF + +-cat >>$CONFIG_STATUS <<\_ACEOF +-# If no file are specified by the user, then we need to provide default +-# value. By we need to know if files were specified by the user. ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ++# The default lists apply if the user does not specify any file. + ac_need_defaults=: + while test $# != 0 + do + case $1 in +- --*=*) ++ --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; ++ --*=) ++ ac_option=`expr "X$1" : 'X\([^=]*\)='` ++ ac_optarg= ++ ac_shift=: ++ ;; + *) + ac_option=$1 + ac_optarg=$2 +@@ -6764,34 +5605,41 @@ do + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) +- echo "$ac_cs_version"; exit ;; ++ $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 +- CONFIG_FILES="$CONFIG_FILES $ac_optarg" ++ case $ac_optarg in ++ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; ++ '') as_fn_error $? "missing file argument" ;; ++ esac ++ as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift +- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ++ case $ac_optarg in ++ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; ++ esac ++ as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header +- { echo "$as_me: error: ambiguous option: $1 +-Try \`$0 --help' for more information." >&2 +- { (exit 1); exit 1; }; };; ++ as_fn_error $? "ambiguous option: \`$1' ++Try \`$0 --help' for more information.";; + --help | --hel | -h ) +- echo "$ac_cs_usage"; exit ;; ++ $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. +- -*) { echo "$as_me: error: unrecognized option: $1 +-Try \`$0 --help' for more information." >&2 +- { (exit 1); exit 1; }; } ;; ++ -*) as_fn_error $? "unrecognized option: \`$1' ++Try \`$0 --help' for more information." ;; + +- *) ac_config_targets="$ac_config_targets $1" ++ *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac +@@ -6806,30 +5654,32 @@ if $ac_cs_silent; then + fi + + _ACEOF +-cat >>$CONFIG_STATUS <<_ACEOF ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + if \$ac_cs_recheck; then +- echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 +- CONFIG_SHELL=$SHELL ++ 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 $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion ++ exec "\$@" + fi + + _ACEOF +-cat >>$CONFIG_STATUS <<\_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 +- echo "$ac_log" ++ $as_echo "$ac_log" + } >&5 + + _ACEOF +-cat >>$CONFIG_STATUS <<_ACEOF ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + _ACEOF + +-cat >>$CONFIG_STATUS <<\_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + + # Handling of arguments. + for ac_config_target in $ac_config_targets +@@ -6838,9 +5688,7 @@ do + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + +- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +-echo "$as_me: error: invalid argument: $ac_config_target" >&2;} +- { (exit 1); exit 1; }; };; ++ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac + done + +@@ -6862,171 +5710,302 @@ fi + # after its creation but before its name has been assigned to `$tmp'. + $debug || + { +- tmp= ++ tmp= ac_tmp= + trap 'exit_status=$? +- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ++ : "${ac_tmp:=$tmp}" ++ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status + ' 0 +- trap '{ (exit 1); exit 1; }' 1 2 13 15 ++ trap 'as_fn_exit 1' 1 2 13 15 + } + # Create a (secure) tmp directory for tmp files. + + { + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && +- test -n "$tmp" && test -d "$tmp" ++ test -d "$tmp" + } || + { + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +-} || +-{ +- echo "$me: cannot create a temporary directory in ." >&2 +- { (exit 1); exit 1; } +-} +- +-# +-# Set up the sed scripts for CONFIG_FILES section. +-# ++} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ++ac_tmp=$tmp + +-# No need to generate the scripts if there are no CONFIG_FILES. +-# This happens for instance when ./config.status config.h ++# 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 + +-_ACEOF + ++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 {' >"$ac_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 +- cat >conf$$subs.sed <<_ACEOF +-SHELL!$SHELL$ac_delim +-PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +-PACKAGE_NAME!$PACKAGE_NAME$ac_delim +-PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +-PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +-PACKAGE_STRING!$PACKAGE_STRING$ac_delim +-PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +-exec_prefix!$exec_prefix$ac_delim +-prefix!$prefix$ac_delim +-program_transform_name!$program_transform_name$ac_delim +-bindir!$bindir$ac_delim +-sbindir!$sbindir$ac_delim +-libexecdir!$libexecdir$ac_delim +-datarootdir!$datarootdir$ac_delim +-datadir!$datadir$ac_delim +-sysconfdir!$sysconfdir$ac_delim +-sharedstatedir!$sharedstatedir$ac_delim +-localstatedir!$localstatedir$ac_delim +-includedir!$includedir$ac_delim +-oldincludedir!$oldincludedir$ac_delim +-docdir!$docdir$ac_delim +-infodir!$infodir$ac_delim +-htmldir!$htmldir$ac_delim +-dvidir!$dvidir$ac_delim +-pdfdir!$pdfdir$ac_delim +-psdir!$psdir$ac_delim +-libdir!$libdir$ac_delim +-localedir!$localedir$ac_delim +-mandir!$mandir$ac_delim +-DEFS!$DEFS$ac_delim +-ECHO_C!$ECHO_C$ac_delim +-ECHO_N!$ECHO_N$ac_delim +-ECHO_T!$ECHO_T$ac_delim +-LIBS!$LIBS$ac_delim +-build_alias!$build_alias$ac_delim +-host_alias!$host_alias$ac_delim +-target_alias!$target_alias$ac_delim +-CC!$CC$ac_delim +-CFLAGS!$CFLAGS$ac_delim +-LDFLAGS!$LDFLAGS$ac_delim +-CPPFLAGS!$CPPFLAGS$ac_delim +-ac_ct_CC!$ac_ct_CC$ac_delim +-EXEEXT!$EXEEXT$ac_delim +-OBJEXT!$OBJEXT$ac_delim +-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +-INSTALL_DATA!$INSTALL_DATA$ac_delim +-PKG_CONFIG!$PKG_CONFIG$ac_delim +-XML_CFLAGS!$XML_CFLAGS$ac_delim +-XML_LIBS!$XML_LIBS$ac_delim +-CURL_CFLAGS!$CURL_CFLAGS$ac_delim +-CURL_LIBS!$CURL_LIBS$ac_delim +-FUSE_CFLAGS!$FUSE_CFLAGS$ac_delim +-FUSE_LIBS!$FUSE_LIBS$ac_delim +-ALLOCA!$ALLOCA$ac_delim +-CPP!$CPP$ac_delim +-GREP!$GREP$ac_delim +-EGREP!$EGREP$ac_delim +-LIBOBJS!$LIBOBJS$ac_delim +-LTLIBOBJS!$LTLIBOBJS$ac_delim +-_ACEOF ++ . ./conf$$subs.sh || ++ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + +- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 60; then ++ 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 +- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi + done ++rm -f conf$$subs.sh ++ ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ++cat >>"\$ac_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 >>"\$ac_tmp/subs1.awk" <<_ACAWK && ++ for (key in S) S_is_set[key] = 1 ++ FS = "" + +-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +-if test -n "$ac_eof"; then +- ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` +- ac_eof=`expr $ac_eof + 1` +-fi ++} ++{ ++ 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 ++} + +-cat >>$CONFIG_STATUS <<_ACEOF +-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end ++_ACAWK + _ACEOF +-sed ' +-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +-s/^/s,@/; s/!/@,|#_!!_#|/ +-:n +-t n +-s/'"$ac_delim"'$/,g/; t +-s/$/\\/; p +-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +-' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +-:end +-s/|#_!!_#|//g +-CEOF$ac_eof ++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 < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ ++ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 + _ACEOF + +- +-# VPATH may cause trouble with some makes, so we remove $(srcdir), +-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and ++# VPATH may cause trouble with some makes, so we remove sole $(srcdir), ++# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and + # trailing colons and then remove the whole line if VPATH becomes empty + # (actually we leave an empty line to preserve line numbers). + if test "x$srcdir" = x.; then +- ac_vpsub='/^[ ]*VPATH[ ]*=/{ +-s/:*\$(srcdir):*/:/ +-s/:*\${srcdir}:*/:/ +-s/:*@srcdir@:*/:/ +-s/^\([^=]*=[ ]*\):*/\1/ ++ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ ++h ++s/// ++s/^/:/ ++s/[ ]*$/:/ ++s/:\$(srcdir):/:/g ++s/:\${srcdir}:/:/g ++s/:@srcdir@:/:/g ++s/^:*// + s/:*$// ++x ++s/\(=[ ]*\).*/\1/ ++G ++s/\n// + s/^[^=]*=[ ]*$// + }' + fi + +-cat >>$CONFIG_STATUS <<\_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + fi # test -n "$CONFIG_FILES" + ++# Set up the scripts for CONFIG_HEADERS section. ++# No need to generate them if there are no CONFIG_HEADERS. ++# This happens for instance with `./config.status Makefile'. ++if test -n "$CONFIG_HEADERS"; then ++cat >"$ac_tmp/defines.awk" <<\_ACAWK || ++BEGIN { ++_ACEOF ++ ++# Transform confdefs.h into an awk script `defines.awk', embedded as ++# here-document in config.status, that substitutes the proper values into ++# config.h.in to produce config.h. ++ ++# Create a delimiter string that does not exist in confdefs.h, to ease ++# handling of long lines. ++ac_delim='%!_!# ' ++for ac_last_try in false false :; do ++ ac_tt=`sed -n "/$ac_delim/p" confdefs.h` ++ if test -z "$ac_tt"; then ++ break ++ elif $ac_last_try; then ++ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 ++ else ++ ac_delim="$ac_delim!$ac_delim _$ac_delim!! " ++ fi ++done ++ ++# For the awk script, D is an array of macro values keyed by name, ++# likewise P contains macro parameters if any. Preserve backslash ++# newline sequences. ++ ++ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* ++sed -n ' ++s/.\{148\}/&'"$ac_delim"'/g ++t rset ++:rset ++s/^[ ]*#[ ]*define[ ][ ]*/ / ++t def ++d ++:def ++s/\\$// ++t bsnl ++s/["\\]/\\&/g ++s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ ++D["\1"]=" \3"/p ++s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p ++d ++:bsnl ++s/["\\]/\\&/g ++s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ ++D["\1"]=" \3\\\\\\n"\\/p ++t cont ++s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p ++t cont ++d ++:cont ++n ++s/.\{148\}/&'"$ac_delim"'/g ++t clear ++:clear ++s/\\$// ++t bsnlc ++s/["\\]/\\&/g; s/^/"/; s/$/"/p ++d ++:bsnlc ++s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p ++b cont ++' >$CONFIG_STATUS || ac_write_fail=1 ++ ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ++ for (key in D) D_is_set[key] = 1 ++ FS = "" ++} ++/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { ++ line = \$ 0 ++ split(line, arg, " ") ++ if (arg[1] == "#") { ++ defundef = arg[2] ++ mac1 = arg[3] ++ } else { ++ defundef = substr(arg[1], 2) ++ mac1 = arg[2] ++ } ++ split(mac1, mac2, "(") #) ++ macro = mac2[1] ++ prefix = substr(line, 1, index(line, defundef) - 1) ++ if (D_is_set[macro]) { ++ # Preserve the white space surrounding the "#". ++ print prefix "define", macro P[macro] D[macro] ++ next ++ } else { ++ # Replace #undef with comments. This is necessary, for example, ++ # in the case of _POSIX_SOURCE, which is predefined and required ++ # on some systems where configure will not decide to define it. ++ if (defundef == "undef") { ++ print "/*", prefix defundef, macro, "*/" ++ next ++ } ++ } ++} ++{ print } ++_ACAWK ++_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ++ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 ++fi # test -n "$CONFIG_HEADERS" ++ + +-for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS ++eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " ++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*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +-echo "$as_me: error: Invalid tag $ac_tag." >&2;} +- { (exit 1); exit 1; }; };; ++ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac +@@ -7045,7 +6024,7 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;} + for ac_f + do + case $ac_f in +- -) ac_f="$tmp/stdin";; ++ -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. +@@ -7054,26 +6033,34 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;} + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || +- { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +-echo "$as_me: error: cannot find input file: $ac_f" >&2;} +- { (exit 1); exit 1; }; };; ++ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac +- ac_file_inputs="$ac_file_inputs $ac_f" ++ 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 "`IFS=: +- echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." ++ 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" +- { echo "$as_me:$LINENO: creating $ac_file" >&5 +-echo "$as_me: creating $ac_file" >&6;} ++ { $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";; ++ *:-:* | *:-) cat >"$ac_tmp/stdin" \ ++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac +@@ -7083,42 +6070,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +-echo X"$ac_file" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ +- s//\1/ +- q +- } +- /^X\(\/\/\)[^/].*/{ +- s//\1/ +- q +- } +- /^X\(\/\/\)$/{ +- s//\1/ +- q +- } +- /^X\(\/\).*/{ +- s//\1/ +- q +- } +- s/.*/./; q'` +- { as_dir="$ac_dir" +- case $as_dir in #( +- -*) as_dir=./$as_dir;; +- esac +- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { +- as_dirs= +- while :; do +- case $as_dir in #( +- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( +- *) as_qdir=$as_dir;; +- esac +- as_dirs="'$as_qdir' $as_dirs" +- as_dir=`$as_dirname -- "$as_dir" || +-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$as_dir" : 'X\(//\)[^/]' \| \ +- X"$as_dir" : 'X\(//\)$' \| \ +- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +-echo X"$as_dir" | ++$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q +@@ -7136,20 +6088,15 @@ echo X"$as_dir" | + q + } + s/.*/./; q'` +- test -d "$as_dir" && break +- done +- test -z "$as_dirs" || eval "mkdir $as_dirs" +- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +-echo "$as_me: error: cannot create directory $as_dir" >&2;} +- { (exit 1); exit 1; }; }; } ++ as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + + case "$ac_dir" in + .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) +- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` ++ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. +- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` ++ 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/ ;; +@@ -7194,12 +6141,12 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + esac + _ACEOF + +-cat >>$CONFIG_STATUS <<\_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= +- +-case `sed -n '/datarootdir/ { ++ac_sed_dataroot=' ++/datarootdir/ { + p + q + } +@@ -7207,36 +6154,37 @@ case `sed -n '/datarootdir/ { + /@docdir@/p + /@infodir@/p + /@localedir@/p +-/@mandir@/p +-' $ac_file_inputs` in ++/@mandir@/p' ++case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in + *datarootdir*) ac_datarootdir_seen=yes;; + *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) +- { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +-echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} ++ { $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 ++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' ;; ++ 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 +- sed "$ac_vpsub ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ++ac_sed_extra="$ac_vpsub + $extrasub + _ACEOF +-cat >>$CONFIG_STATUS <<\_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + :t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b +-s&@configure_input@&$configure_input&;t t ++s|@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 +@@ -7247,119 +6195,49 @@ 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 +-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out ++" ++eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ ++ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + + test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && +- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && +- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && +- { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +-which seems to be undefined. Please make sure it is defined." >&5 +-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" ++ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && ++ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ ++ "$ac_tmp/out"`; test -z "$ac_out"; } && ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' ++which seems to be undefined. Please make sure it is defined" >&5 ++$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' ++which seems to be undefined. Please make sure it is defined" >&2;} ++ ++ rm -f "$ac_tmp/stdin" + case $ac_file in +- -) cat "$tmp/out"; rm -f "$tmp/out";; +- *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; +- esac ++ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; ++ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; ++ esac \ ++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # +-_ACEOF +- +-# Transform confdefs.h into a sed script `conftest.defines', that +-# substitutes the proper values into config.h.in to produce config.h. +-rm -f conftest.defines conftest.tail +-# First, append a space to every undef/define line, to ease matching. +-echo 's/$/ /' >conftest.defines +-# Then, protect against being on the right side of a sed subst, or in +-# an unquoted here document, in config.status. If some macros were +-# called several times there might be several #defines for the same +-# symbol, which is useless. But do not sort them, since the last +-# AC_DEFINE must be honored. +-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +-# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +-# NAME is the cpp macro being defined, VALUE is the value it is being given. +-# PARAMS is the parameter list in the macro definition--in most cases, it's +-# just an empty string. +-ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +-ac_dB='\\)[ (].*,\\1define\\2' +-ac_dC=' ' +-ac_dD=' ,' +- +-uniq confdefs.h | +- sed -n ' +- t rset +- :rset +- s/^[ ]*#[ ]*define[ ][ ]*// +- t ok +- d +- :ok +- s/[\\&,]/\\&/g +- s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p +- s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p +- ' >>conftest.defines +- +-# Remove the space that was appended to ease matching. +-# Then replace #undef with comments. This is necessary, for +-# example, in the case of _POSIX_SOURCE, which is predefined and required +-# on some systems where configure will not decide to define it. +-# (The regexp can be short, since the line contains either #define or #undef.) +-echo 's/ $// +-s,^[ #]*u.*,/* & */,' >>conftest.defines +- +-# Break up conftest.defines: +-ac_max_sed_lines=50 +- +-# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +-# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +-# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +-# et cetera. +-ac_in='$ac_file_inputs' +-ac_out='"$tmp/out1"' +-ac_nxt='"$tmp/out2"' +- +-while : +-do +- # Write a here document: +- cat >>$CONFIG_STATUS <<_ACEOF +- # First, check the format of the line: +- cat >"\$tmp/defines.sed" <<\\CEOF +-/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +-/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +-b +-:def +-_ACEOF +- sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS +- echo 'CEOF +- sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS +- ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in +- sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail +- grep . conftest.tail >/dev/null || break +- rm -f conftest.defines +- mv conftest.tail conftest.defines +-done +-rm -f conftest.defines conftest.tail +- +-echo "ac_result=$ac_in" >>$CONFIG_STATUS +-cat >>$CONFIG_STATUS <<\_ACEOF + if test x"$ac_file" != x-; then +- echo "/* $configure_input */" >"$tmp/config.h" +- cat "$ac_result" >>"$tmp/config.h" +- if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then +- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +-echo "$as_me: $ac_file is unchanged" >&6;} ++ { ++ $as_echo "/* $configure_input */" \ ++ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" ++ } >"$ac_tmp/config.h" \ ++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ++ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 ++$as_echo "$as_me: $ac_file is unchanged" >&6;} + else +- rm -f $ac_file +- mv "$tmp/config.h" $ac_file ++ rm -f "$ac_file" ++ mv "$ac_tmp/config.h" "$ac_file" \ ++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else +- echo "/* $configure_input */" +- cat "$ac_result" ++ $as_echo "/* $configure_input */" \ ++ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ ++ || as_fn_error $? "could not create -" "$LINENO" 5 + fi +- rm -f "$tmp/out12" + ;; + + +@@ -7368,11 +6246,13 @@ echo "$as_me: $ac_file is unchanged" >&6;} + done # for ac_tag + + +-{ (exit 0); exit 0; } ++as_fn_exit 0 + _ACEOF +-chmod +x $CONFIG_STATUS + ac_clean_files=$ac_clean_files_save + ++test $ac_write_fail = 0 || ++ as_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. +@@ -7392,6 +6272,10 @@ if test "$no_create" != yes; then + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. +- $ac_cs_success || { (exit 1); exit 1; } ++ $ac_cs_success || as_fn_exit 1 ++fi ++if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 ++$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + fi + +-- +1.7.9.5 + diff --git a/debian/patches/0015-make-Makefile-obey-DESTDIR.txt b/debian/patches/0015-make-Makefile-obey-DESTDIR.txt new file mode 100644 index 0000000..0b8c049 --- /dev/null +++ b/debian/patches/0015-make-Makefile-obey-DESTDIR.txt @@ -0,0 +1,25 @@ +From f2619ee2bf5249d15bc9bd4db4785c7c4b61433d Mon Sep 17 00:00:00 2001 +From: Mike Lundy +Date: Wed, 31 Aug 2011 16:09:54 -0700 +Subject: [PATCH 15/17] make Makefile obey DESTDIR + +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 05a22c5..3159c7f 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -9,7 +9,7 @@ INSTALL = @INSTALL@ + MKDIR_P = @MKDIR_P@ + prefix = @prefix@ + exec_prefix = @exec_prefix@ +-bindir = $(exec_prefix)/bin ++bindir = $(DESTDIR)$(exec_prefix)/bin + + SOURCES=cloudfsapi.c cloudfuse.c + HEADERS=cloudfsapi.h +-- +1.7.9.5 + diff --git a/debian/patches/0016-Only-include-alloca.h-for-Linux-Certainly-not-for-NetB.txt b/debian/patches/0016-Only-include-alloca.h-for-Linux-Certainly-not-for-NetB.txt new file mode 100644 index 0000000..536755a --- /dev/null +++ b/debian/patches/0016-Only-include-alloca.h-for-Linux-Certainly-not-for-NetB.txt @@ -0,0 +1,27 @@ +From 556b887300db437f55cf61e9acb9c5ca5065b404 Mon Sep 17 00:00:00 2001 +From: David Brownlee +Date: Fri, 14 Oct 2011 18:25:40 +0100 +Subject: [PATCH 16/17] Only include for Linux (Certainly not for + NetBSD) + +--- + cloudfsapi.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/cloudfsapi.c b/cloudfsapi.c +index 0940da0..b983567 100644 +--- a/cloudfsapi.c ++++ b/cloudfsapi.c +@@ -4,7 +4,9 @@ + #include + #include + #include ++#ifdef __linux__ + #include ++#endif + #include + #include + #include +-- +1.7.9.5 + diff --git a/debian/patches/0017-parse-size-with-strtoll-Joseph-Dunn.txt b/debian/patches/0017-parse-size-with-strtoll-Joseph-Dunn.txt new file mode 100644 index 0000000..777e589 --- /dev/null +++ b/debian/patches/0017-parse-size-with-strtoll-Joseph-Dunn.txt @@ -0,0 +1,25 @@ +From 1003a82747e5560488df1b79f691f1ca3d0ddbbe Mon Sep 17 00:00:00 2001 +From: Mike Barton +Date: Tue, 24 Jan 2012 23:00:35 +0400 +Subject: [PATCH 17/17] parse size with strtoll (Joseph Dunn) + +--- + cloudfsapi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cloudfsapi.c b/cloudfsapi.c +index b983567..ba14035 100644 +--- a/cloudfsapi.c ++++ b/cloudfsapi.c +@@ -286,7 +286,7 @@ int list_directory(const char *path, dir_entry **dir_list) + de->full_name = NULL; + } + if (!strcasecmp((const char *)anode->name, "bytes")) +- de->size = atoi(content); ++ de->size = strtoll(content, NULL, 10); + if (!strcasecmp((const char *)anode->name, "content_type")) + { + de->content_type = strdup(content); +-- +1.7.9.5 + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..ea7fc2b --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,17 @@ +0001-lock-mutex-around-login.txt +0002-clear-xml-context-correctly-on-401.txt +0003-change-how-xml-context-is-reset-on-re-auth.txt +0004-improve-retry-logic-fix-multithreading-problems.txt +0005-don-t-verify-peer-on-auth.-TODO-make-that-an-option.txt +0006-even-unsafer-ssl-options.txt +0007-Clean-up-C-code-remove-nested-functions.txt +0008-Implement-rename-using-the-Copy-object-functionality.txt +0009-add-contributors-to-README.txt +0010-protect-directories-from-rename.txt +0011-arrange-code-back-to-my-preference.txt +0012-remove-deprecated-unneeded-include.txt +0013-add-openssl-to-the-configure-discovery.txt +0014-regenerate-configure.txt +0015-make-Makefile-obey-DESTDIR.txt +0016-Only-include-alloca.h-for-Linux-Certainly-not-for-NetB.txt +0017-parse-size-with-strtoll-Joseph-Dunn.txt diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..b760bee --- /dev/null +++ b/debian/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..d6b81b3 --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://githubredir.debian.net/github/redbo/cloudfuse (.*).tar.gz From 491a23144e1671b97ce994fc5eac9c85fba278e1 Mon Sep 17 00:00:00 2001 From: amontero Date: Thu, 26 Dec 2013 20:22:06 +0100 Subject: [PATCH 14/42] Remove Debian pacthes already commited upstream. --- .../patches/0001-lock-mutex-around-login.txt | 32 - ...002-clear-xml-context-correctly-on-401.txt | 29 - ...ge-how-xml-context-is-reset-on-re-auth.txt | 40 - ...etry-logic-fix-multithreading-problems.txt | 154 - ...peer-on-auth.-TODO-make-that-an-option.txt | 26 - .../patches/0006-even-unsafer-ssl-options.txt | 32 - ...lean-up-C-code-remove-nested-functions.txt | 208 - ...me-using-the-Copy-object-functionality.txt | 166 - .../0009-add-contributors-to-README.txt | 30 - .../0010-protect-directories-from-rename.txt | 41 - ...011-arrange-code-back-to-my-preference.txt | 121 - ...012-remove-deprecated-unneeded-include.txt | 25 - ...add-openssl-to-the-configure-discovery.txt | 41 - debian/patches/0014-regenerate-configure.txt | 8888 ----------------- .../0015-make-Makefile-obey-DESTDIR.txt | 25 - ...oca.h-for-Linux-Certainly-not-for-NetB.txt | 27 - ...17-parse-size-with-strtoll-Joseph-Dunn.txt | 25 - debian/patches/series | 17 - 18 files changed, 9927 deletions(-) delete mode 100644 debian/patches/0001-lock-mutex-around-login.txt delete mode 100644 debian/patches/0002-clear-xml-context-correctly-on-401.txt delete mode 100644 debian/patches/0003-change-how-xml-context-is-reset-on-re-auth.txt delete mode 100644 debian/patches/0004-improve-retry-logic-fix-multithreading-problems.txt delete mode 100644 debian/patches/0005-don-t-verify-peer-on-auth.-TODO-make-that-an-option.txt delete mode 100644 debian/patches/0006-even-unsafer-ssl-options.txt delete mode 100644 debian/patches/0007-Clean-up-C-code-remove-nested-functions.txt delete mode 100644 debian/patches/0008-Implement-rename-using-the-Copy-object-functionality.txt delete mode 100644 debian/patches/0009-add-contributors-to-README.txt delete mode 100644 debian/patches/0010-protect-directories-from-rename.txt delete mode 100644 debian/patches/0011-arrange-code-back-to-my-preference.txt delete mode 100644 debian/patches/0012-remove-deprecated-unneeded-include.txt delete mode 100644 debian/patches/0013-add-openssl-to-the-configure-discovery.txt delete mode 100644 debian/patches/0014-regenerate-configure.txt delete mode 100644 debian/patches/0015-make-Makefile-obey-DESTDIR.txt delete mode 100644 debian/patches/0016-Only-include-alloca.h-for-Linux-Certainly-not-for-NetB.txt delete mode 100644 debian/patches/0017-parse-size-with-strtoll-Joseph-Dunn.txt delete mode 100644 debian/patches/series diff --git a/debian/patches/0001-lock-mutex-around-login.txt b/debian/patches/0001-lock-mutex-around-login.txt deleted file mode 100644 index 873d2ee..0000000 --- a/debian/patches/0001-lock-mutex-around-login.txt +++ /dev/null @@ -1,32 +0,0 @@ -From 60f5aa9871cfe6036554c914283355e95795985c Mon Sep 17 00:00:00 2001 -From: Mike Barton -Date: Mon, 7 Mar 2011 22:23:05 +0000 -Subject: [PATCH 01/17] lock mutex around login - ---- - cloudfsapi.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/cloudfsapi.c b/cloudfsapi.c -index 5636e41..10115b5 100644 ---- a/cloudfsapi.c -+++ b/cloudfsapi.c -@@ -398,6 +398,7 @@ int cloudfs_connect(char *username, char *password, char *authurl, int use_snet) - return size * nmemb; - } - -+ pthread_mutex_lock(&pool_mut); - storage_token[0] = storage_url[0] = '\0'; - curl_slist *headers = NULL; - add_header(&headers, "X-Auth-User", username); -@@ -416,6 +417,7 @@ int cloudfs_connect(char *username, char *password, char *authurl, int use_snet) - curl_easy_cleanup(curl); - if (use_snet && storage_url[0]) - rewrite_url_snet(storage_url); -+ pthread_mutex_unlock(&pool_mut); - return (response >= 200 && response < 300 && storage_token[0] && storage_url[0]); - } - --- -1.7.9.5 - diff --git a/debian/patches/0002-clear-xml-context-correctly-on-401.txt b/debian/patches/0002-clear-xml-context-correctly-on-401.txt deleted file mode 100644 index fa6cc5a..0000000 --- a/debian/patches/0002-clear-xml-context-correctly-on-401.txt +++ /dev/null @@ -1,29 +0,0 @@ -From 6db27d240773fc65bc34d45e3f604518e2749dd0 Mon Sep 17 00:00:00 2001 -From: Mike Barton -Date: Thu, 10 Mar 2011 03:48:59 +0000 -Subject: [PATCH 02/17] clear xml context correctly on 401 - ---- - cloudfsapi.c | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -diff --git a/cloudfsapi.c b/cloudfsapi.c -index 10115b5..653afdb 100644 ---- a/cloudfsapi.c -+++ b/cloudfsapi.c -@@ -170,11 +170,7 @@ static int send_request(char *method, const char *path, FILE *fp, xmlParserCtxtP - curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); - } - if (xmlctx) -- { -- xmlFreeDoc(xmlctx->myDoc); -- xmlFreeParserCtxt(xmlctx); -- xmlctx = xmlCreatePushParserCtxt(NULL, NULL, "", 0, NULL); -- } -+ xmlClearParserCtxt(xmlctx); - if (fp) - rewind(fp); - debugf("Attempting request again"); --- -1.7.9.5 - diff --git a/debian/patches/0003-change-how-xml-context-is-reset-on-re-auth.txt b/debian/patches/0003-change-how-xml-context-is-reset-on-re-auth.txt deleted file mode 100644 index 88e2bea..0000000 --- a/debian/patches/0003-change-how-xml-context-is-reset-on-re-auth.txt +++ /dev/null @@ -1,40 +0,0 @@ -From 7b8f567a79e7e2eeb949cf101d7690c5a78a8da6 Mon Sep 17 00:00:00 2001 -From: Mike Barton -Date: Sun, 13 Mar 2011 18:07:33 +0000 -Subject: [PATCH 03/17] change how xml context is reset on re-auth - ---- - cloudfsapi.c | 4 +++- - cloudfuse.c | 1 - - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/cloudfsapi.c b/cloudfsapi.c -index 653afdb..5b80102 100644 ---- a/cloudfsapi.c -+++ b/cloudfsapi.c -@@ -170,7 +170,9 @@ static int send_request(char *method, const char *path, FILE *fp, xmlParserCtxtP - curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); - } - if (xmlctx) -- xmlClearParserCtxt(xmlctx); -+ { -+ xmlCtxtResetPush(xmlctx, NULL, 0, NULL, NULL); -+ } - if (fp) - rewind(fp); - debugf("Attempting request again"); -diff --git a/cloudfuse.c b/cloudfuse.c -index 71fab19..7ca29a4 100644 ---- a/cloudfuse.c -+++ b/cloudfuse.c -@@ -209,7 +209,6 @@ static int cfs_getattr(const char *path, struct stat *stbuf) - stbuf->st_size = de->size; - /* calc. blocks as if 4K blocksize filesystem; stat uses units of 512B */ - stbuf->st_blocks = ((4095 + de->size) / 4096) * 8; -- debugf("size %ld blocks %ld", de->size, stbuf->st_blocks); - stbuf->st_mode = S_IFREG | 0666; - stbuf->st_nlink = 1; - } --- -1.7.9.5 - diff --git a/debian/patches/0004-improve-retry-logic-fix-multithreading-problems.txt b/debian/patches/0004-improve-retry-logic-fix-multithreading-problems.txt deleted file mode 100644 index e855d9d..0000000 --- a/debian/patches/0004-improve-retry-logic-fix-multithreading-problems.txt +++ /dev/null @@ -1,154 +0,0 @@ -From db8cd169c0566efdd9f9402793605fac9ec6aa58 Mon Sep 17 00:00:00 2001 -From: Mike Barton -Date: Mon, 14 Mar 2011 20:16:55 +0000 -Subject: [PATCH 04/17] improve retry logic, fix multithreading problems - ---- - cloudfsapi.c | 94 +++++++++++++++++++++++++++------------------------------- - 1 file changed, 44 insertions(+), 50 deletions(-) - -diff --git a/cloudfsapi.c b/cloudfsapi.c -index 5b80102..29fb87b 100644 ---- a/cloudfsapi.c -+++ b/cloudfsapi.c -@@ -14,6 +14,8 @@ - #include "cloudfsapi.h" - #include "config.h" - -+#define REQUEST_RETRIES 4 -+ - static char storage_url[MAX_URL_SIZE]; - static char storage_token[MAX_HEADER_SIZE]; - static pthread_mutex_t pool_mut; -@@ -70,12 +72,12 @@ static size_t xml_dispatch(void *ptr, size_t size, size_t nmemb, void *stream) - static CURL *get_connection(const char *path) - { - char url[MAX_URL_SIZE]; -+ pthread_mutex_lock(&pool_mut); - if (!storage_url[0]) - { - debugf("get_connection with no storage_url?"); - abort(); - } -- pthread_mutex_lock(&pool_mut); - CURL *curl = curl_pool_count ? curl_pool[--curl_pool_count] : curl_easy_init(); - if (!curl) - { -@@ -121,66 +123,57 @@ void add_header(curl_slist **headers, const char *name, const char *value) - static int send_request(char *method, const char *path, FILE *fp, xmlParserCtxtPtr xmlctx) - { - long response = -1; -- CURL *curl = get_connection(path); -- curl_slist *headers = NULL; -- add_header(&headers, "X-Auth-Token", storage_token); -+ int tries = 0; - -- if (!strcasecmp(method, "MKDIR")) -- { -- curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); -- curl_easy_setopt(curl, CURLOPT_INFILESIZE, 0); -- add_header(&headers, "Content-Type", "application/directory"); -- } -- else if (!strcasecmp(method, "PUT") && fp) -- { -- curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); -- curl_easy_setopt(curl, CURLOPT_INFILESIZE, file_size(fileno(fp))); -- curl_easy_setopt(curl, CURLOPT_READDATA, fp); -- } -- else -+ // retry on failures -+ for (tries = 0; tries < REQUEST_RETRIES; tries++) - { -- curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, method); -- if (xmlctx) -+ CURL *curl = get_connection(path); -+ curl_slist *headers = NULL; -+ add_header(&headers, "X-Auth-Token", storage_token); -+ if (!strcasecmp(method, "MKDIR")) - { -- curl_easy_setopt(curl, CURLOPT_WRITEDATA, xmlctx); -- curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &xml_dispatch); -+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); -+ curl_easy_setopt(curl, CURLOPT_INFILESIZE, 0); -+ add_header(&headers, "Content-Type", "application/directory"); - } -- else if (fp) -- curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp); -- } -- curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); -- curl_easy_perform(curl); -- curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response); -- if (response >= 500 || response == 401) // retry on failures -- { -- sleep(5); -- if (response == 401) // re-authenticate on 401s -+ else if (!strcasecmp(method, "PUT") && fp) - { -- debugf("Re-authenticating"); -- curl_slist_free_all(headers); -- headers = NULL; -- if (!cloudfs_connect(0, 0, 0, 0)) -- { -- return_connection(curl); -- return response; -- } -- add_header(&headers, "X-Auth-Token", storage_token); -- if (!strcasecmp(method, "MKDIR")) -- add_header(&headers, "Content-Type", "application/directory"); -- curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); -+ rewind(fp); -+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); -+ curl_easy_setopt(curl, CURLOPT_INFILESIZE, file_size(fileno(fp))); -+ curl_easy_setopt(curl, CURLOPT_READDATA, fp); - } -- if (xmlctx) -+ else if (!strcasecmp(method, "GET")) - { -- xmlCtxtResetPush(xmlctx, NULL, 0, NULL, NULL); -+ if (fp) -+ { -+ rewind(fp); // make sure the file is ready for a-writin' -+ fflush(fp); -+ ftruncate(fileno(fp), 0); -+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp); -+ } -+ else if (xmlctx) -+ { -+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, xmlctx); -+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &xml_dispatch); -+ } - } -- if (fp) -- rewind(fp); -- debugf("Attempting request again"); -+ else -+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, method); -+ curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); - curl_easy_perform(curl); - curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response); -+ curl_slist_free_all(headers); -+ return_connection(curl); -+ if (response >= 200 && response < 400) -+ return response; -+ sleep(8 << tries); // backoff -+ if (response == 401 && !cloudfs_connect(0, 0, 0, 0)) // re-authenticate on 401s -+ return response; -+ if (xmlctx) -+ xmlCtxtResetPush(xmlctx, NULL, 0, NULL, NULL); - } -- curl_slist_free_all(headers); -- return_connection(curl); - return response; - } - -@@ -397,6 +390,7 @@ int cloudfs_connect(char *username, char *password, char *authurl, int use_snet) - } - - pthread_mutex_lock(&pool_mut); -+ debugf("Authenticating..."); - storage_token[0] = storage_url[0] = '\0'; - curl_slist *headers = NULL; - add_header(&headers, "X-Auth-User", username); --- -1.7.9.5 - diff --git a/debian/patches/0005-don-t-verify-peer-on-auth.-TODO-make-that-an-option.txt b/debian/patches/0005-don-t-verify-peer-on-auth.-TODO-make-that-an-option.txt deleted file mode 100644 index 678a6fa..0000000 --- a/debian/patches/0005-don-t-verify-peer-on-auth.-TODO-make-that-an-option.txt +++ /dev/null @@ -1,26 +0,0 @@ -From 1e9426ad7f4bb071aaf1297fc0899b6d5f902b2b Mon Sep 17 00:00:00 2001 -From: Mike Barton -Date: Fri, 1 Apr 2011 18:07:21 +0000 -Subject: [PATCH 05/17] don't verify peer on auth.. TODO: make that an option - ---- - cloudfsapi.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/cloudfsapi.c b/cloudfsapi.c -index 29fb87b..8ada14a 100644 ---- a/cloudfsapi.c -+++ b/cloudfsapi.c -@@ -402,7 +402,9 @@ int cloudfs_connect(char *username, char *password, char *authurl, int use_snet) - curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, &header_dispatch); - curl_easy_setopt(curl, CURLOPT_USERAGENT, USER_AGENT); - curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); -+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); - curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10); -+ curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10); - curl_easy_perform(curl); - curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response); - curl_slist_free_all(headers); --- -1.7.9.5 - diff --git a/debian/patches/0006-even-unsafer-ssl-options.txt b/debian/patches/0006-even-unsafer-ssl-options.txt deleted file mode 100644 index 9213a4d..0000000 --- a/debian/patches/0006-even-unsafer-ssl-options.txt +++ /dev/null @@ -1,32 +0,0 @@ -From 0c63cc17e387ae436de4c5bc02785389ee94fbc2 Mon Sep 17 00:00:00 2001 -From: Mike Barton -Date: Fri, 1 Apr 2011 18:24:23 +0000 -Subject: [PATCH 06/17] even unsafer ssl options... - ---- - cloudfsapi.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/cloudfsapi.c b/cloudfsapi.c -index 8ada14a..9e3a9bc 100644 ---- a/cloudfsapi.c -+++ b/cloudfsapi.c -@@ -101,6 +101,7 @@ static CURL *get_connection(const char *path) - curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1); - curl_easy_setopt(curl, CURLOPT_USERAGENT, USER_AGENT); - curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); -+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); - curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10); - return curl; - } -@@ -403,6 +404,7 @@ int cloudfs_connect(char *username, char *password, char *authurl, int use_snet) - curl_easy_setopt(curl, CURLOPT_USERAGENT, USER_AGENT); - curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); - curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); -+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); - curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10); - curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10); - curl_easy_perform(curl); --- -1.7.9.5 - diff --git a/debian/patches/0007-Clean-up-C-code-remove-nested-functions.txt b/debian/patches/0007-Clean-up-C-code-remove-nested-functions.txt deleted file mode 100644 index 704ed73..0000000 --- a/debian/patches/0007-Clean-up-C-code-remove-nested-functions.txt +++ /dev/null @@ -1,208 +0,0 @@ -From c4e9f3ce06f9502892dee8c6c0927282172bb9ff Mon Sep 17 00:00:00 2001 -From: Dillon Amburgey -Date: Wed, 27 Apr 2011 19:27:20 -0500 -Subject: [PATCH 07/17] Clean up C code, remove nested functions - -Allows building in non-gcc compilers (read: clang) ---- - cloudfsapi.c | 35 +++++++++++++++++---------------- - cloudfsapi.h | 2 ++ - cloudfuse.c | 61 +++++++++++++++------------------------------------------- - cloudfuse.h | 34 ++++++++++++++++++++++++++++++++ - 4 files changed, 69 insertions(+), 63 deletions(-) - create mode 100644 cloudfuse.h - -diff --git a/cloudfsapi.c b/cloudfsapi.c -index 9e3a9bc..d8d6dce 100644 ---- a/cloudfsapi.c -+++ b/cloudfsapi.c -@@ -373,23 +373,7 @@ int cloudfs_connect(char *username, char *password, char *authurl, int use_snet) - use_snet = reconnect_args.use_snet; - } - -- size_t header_dispatch(void *ptr, size_t size, size_t nmemb, void *stream) -- { -- char *header = (char *)alloca(size * nmemb + 1); -- char *head = (char *)alloca(size * nmemb + 1); -- char *value = (char *)alloca(size * nmemb + 1); -- memcpy(header, (char *)ptr, size * nmemb); -- header[size * nmemb] = '\0'; -- if (sscanf(header, "%[^:]: %[^\r\n]", head, value) == 2) -- { -- if (!strncasecmp(head, "x-auth-token", size * nmemb)) -- strncpy(storage_token, value, sizeof(storage_token)); -- if (!strncasecmp(head, "x-storage-url", size * nmemb)) -- strncpy(storage_url, value, sizeof(storage_url)); -- } -- return size * nmemb; -- } -- -+ - pthread_mutex_lock(&pool_mut); - debugf("Authenticating..."); - storage_token[0] = storage_url[0] = '\0'; -@@ -417,6 +401,23 @@ int cloudfs_connect(char *username, char *password, char *authurl, int use_snet) - return (response >= 200 && response < 300 && storage_token[0] && storage_url[0]); - } - -+size_t header_dispatch(void *ptr, size_t size, size_t nmemb, void *stream) -+{ -+ char *header = (char *)alloca(size * nmemb + 1); -+ char *head = (char *)alloca(size * nmemb + 1); -+ char *value = (char *)alloca(size * nmemb + 1); -+ memcpy(header, (char *)ptr, size * nmemb); -+ header[size * nmemb] = '\0'; -+ if (sscanf(header, "%[^:]: %[^\r\n]", head, value) == 2) -+ { -+ if (!strncasecmp(head, "x-auth-token", size * nmemb)) -+ strncpy(storage_token, value, sizeof(storage_token)); -+ if (!strncasecmp(head, "x-storage-url", size * nmemb)) -+ strncpy(storage_url, value, sizeof(storage_url)); -+ } -+ return size * nmemb; -+} -+ - void debugf(char *fmt, ...) - { - if (debug) -diff --git a/cloudfsapi.h b/cloudfsapi.h -index 19c7bf2..0ab1230 100644 ---- a/cloudfsapi.h -+++ b/cloudfsapi.h -@@ -37,6 +37,8 @@ int object_truncate(const char *path, off_t size); - void load_mimetypes(const char *filename); - off_t file_size(int fd); - -+size_t header_dispatch(void *ptr, size_t size, size_t nmemb, void *stream); -+ - void debugf(char *fmt, ...); - #endif - -diff --git a/cloudfuse.c b/cloudfuse.c -index 7ca29a4..b934e5a 100644 ---- a/cloudfuse.c -+++ b/cloudfuse.c -@@ -16,25 +16,8 @@ - #include - #include "cloudfsapi.h" - #include "config.h" -+#include "cloudfuse.h" - --#define OPTION_SIZE 1024 --static int cache_timeout; -- --typedef struct dir_cache --{ -- char *path; -- dir_entry *entries; -- time_t cached; -- struct dir_cache *next, *prev; --} dir_cache; --static dir_cache *dcache; --static pthread_mutex_t dmut; -- --typedef struct --{ -- int fd; -- int flags; --} openfile; - - static void dir_for(const char *path, char *dir) - { -@@ -398,39 +381,25 @@ char *get_home_dir() - return "~"; - } - -+int parse_option(void *data, const char *arg, int key, struct fuse_args *outargs) -+{ -+ if (sscanf(arg, " username = %[^\r\n ]", options.username) || -+ sscanf(arg, " api_key = %[^\r\n ]", options.api_key) || -+ sscanf(arg, " cache_timeout = %[^\r\n ]", options.cache_timeout) || -+ sscanf(arg, " authurl = %[^\r\n ]", options.authurl) || -+ sscanf(arg, " use_snet = %[^\r\n ]", options.use_snet)) -+ return 0; -+ if (!strcmp(arg, "-f") || !strcmp(arg, "-d") || !strcmp(arg, "debug")) -+ cloudfs_debug(1); -+ return 1; -+} -+ - int main(int argc, char **argv) - { - char settings_filename[MAX_PATH_SIZE] = ""; - FILE *settings; - struct fuse_args args = FUSE_ARGS_INIT(argc, argv); -- -- struct options { -- char username[OPTION_SIZE]; -- char api_key[OPTION_SIZE]; -- char cache_timeout[OPTION_SIZE]; -- char authurl[OPTION_SIZE]; -- char use_snet[OPTION_SIZE]; -- } options = { -- .username = "", -- .api_key = "", -- .cache_timeout = "600", -- .authurl = "https://auth.api.rackspacecloud.com/v1.0", -- .use_snet = "false", -- }; -- -- int parse_option(void *data, const char *arg, int key, struct fuse_args *outargs) -- { -- if (sscanf(arg, " username = %[^\r\n ]", options.username) || -- sscanf(arg, " api_key = %[^\r\n ]", options.api_key) || -- sscanf(arg, " cache_timeout = %[^\r\n ]", options.cache_timeout) || -- sscanf(arg, " authurl = %[^\r\n ]", options.authurl) || -- sscanf(arg, " use_snet = %[^\r\n ]", options.use_snet)) -- return 0; -- if (!strcmp(arg, "-f") || !strcmp(arg, "-d") || !strcmp(arg, "debug")) -- cloudfs_debug(1); -- return 1; -- } -- -+ - fuse_opt_parse(&args, &options, NULL, parse_option); - - snprintf(settings_filename, sizeof(settings_filename), "%s/.cloudfuse", get_home_dir()); -diff --git a/cloudfuse.h b/cloudfuse.h -new file mode 100644 -index 0000000..2572be2 ---- /dev/null -+++ b/cloudfuse.h -@@ -0,0 +1,34 @@ -+#define OPTION_SIZE 1024 -+ -+static int cache_timeout; -+ -+typedef struct dir_cache -+{ -+ char *path; -+ dir_entry *entries; -+ time_t cached; -+ struct dir_cache *next, *prev; -+} dir_cache; -+static dir_cache *dcache; -+static pthread_mutex_t dmut; -+ -+typedef struct -+{ -+ int fd; -+ int flags; -+} openfile; -+ -+struct options { -+ char username[OPTION_SIZE]; -+ char api_key[OPTION_SIZE]; -+ char cache_timeout[OPTION_SIZE]; -+ char authurl[OPTION_SIZE]; -+ char use_snet[OPTION_SIZE]; -+} options = { -+ .username = "", -+ .api_key = "", -+ .cache_timeout = "600", -+ .authurl = "https://auth.api.rackspacecloud.com/v1.0", -+ .use_snet = "false", -+}; -+ --- -1.7.9.5 - diff --git a/debian/patches/0008-Implement-rename-using-the-Copy-object-functionality.txt b/debian/patches/0008-Implement-rename-using-the-Copy-object-functionality.txt deleted file mode 100644 index fcbdc7c..0000000 --- a/debian/patches/0008-Implement-rename-using-the-Copy-object-functionality.txt +++ /dev/null @@ -1,166 +0,0 @@ -From c4ab371ded302e26ceeb1559725dcf726f2e44a0 Mon Sep 17 00:00:00 2001 -From: Nick Craig-Wood -Date: Wed, 29 Jun 2011 17:43:44 +0100 -Subject: [PATCH 08/17] Implement rename using the Copy object functionality - ---- - cloudfsapi.c | 36 ++++++++++++++++++++++++++++-------- - cloudfsapi.h | 1 + - cloudfuse.c | 15 +++++++++++++++ - 3 files changed, 44 insertions(+), 8 deletions(-) - -diff --git a/cloudfsapi.c b/cloudfsapi.c -index 9e3a9bc..3924829 100644 ---- a/cloudfsapi.c -+++ b/cloudfsapi.c -@@ -121,7 +121,7 @@ void add_header(curl_slist **headers, const char *name, const char *value) - *headers = curl_slist_append(*headers, x_header); - } - --static int send_request(char *method, const char *path, FILE *fp, xmlParserCtxtPtr xmlctx) -+static int send_request(char *method, const char *path, FILE *fp, xmlParserCtxtPtr xmlctx, curl_slist *extra_headers) - { - long response = -1; - int tries = 0; -@@ -132,6 +132,7 @@ static int send_request(char *method, const char *path, FILE *fp, xmlParserCtxtP - CURL *curl = get_connection(path); - curl_slist *headers = NULL; - add_header(&headers, "X-Auth-Token", storage_token); -+ curl_easy_setopt(curl, CURLOPT_VERBOSE, debug); - if (!strcasecmp(method, "MKDIR")) - { - curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); -@@ -162,6 +163,13 @@ static int send_request(char *method, const char *path, FILE *fp, xmlParserCtxtP - } - else - curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, method); -+ /* add the headers from extra_headers if any */ -+ curl_slist *extra; -+ for (extra = extra_headers; extra; extra = extra->next) -+ { -+ debugf("adding header: %s", extra->data); -+ headers = curl_slist_append(headers, extra->data); -+ } - curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); - curl_easy_perform(curl); - curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response); -@@ -187,7 +195,7 @@ int object_read_fp(const char *path, FILE *fp) - fflush(fp); - rewind(fp); - char *encoded = curl_escape(path, 0); -- int response = send_request("PUT", encoded, fp, NULL); -+ int response = send_request("PUT", encoded, fp, NULL, NULL); - curl_free(encoded); - return (response >= 200 && response < 300); - } -@@ -195,7 +203,7 @@ int object_read_fp(const char *path, FILE *fp) - int object_write_fp(const char *path, FILE *fp) - { - char *encoded = curl_escape(path, 0); -- int response = send_request("GET", encoded, fp, NULL); -+ int response = send_request("GET", encoded, fp, NULL, NULL); - curl_free(encoded); - fflush(fp); - if ((response >= 200 && response < 300) || ftruncate(fileno(fp), 0)) -@@ -211,12 +219,12 @@ int object_truncate(const char *path, off_t size) - if (size == 0) - { - FILE *fp = fopen("/dev/null", "r"); -- response = send_request("PUT", encoded, fp, NULL); -+ response = send_request("PUT", encoded, fp, NULL, NULL); - fclose(fp); - } - else - {//TODO: this is busted -- response = send_request("GET", encoded, NULL, NULL); -+ response = send_request("GET", encoded, NULL, NULL, NULL); - } - curl_free(encoded); - return (response >= 200 && response < 300); -@@ -246,7 +254,7 @@ int list_directory(const char *path, dir_entry **dir_list) - curl_free(encoded_container); - curl_free(encoded_object); - } -- response = send_request("GET", container, NULL, xmlctx); -+ response = send_request("GET", container, NULL, xmlctx, NULL); - xmlParseChunk(xmlctx, "", 0, 1); - if (xmlctx->wellFormed && response >= 200 && response < 300) - { -@@ -319,15 +327,27 @@ void free_dir_list(dir_entry *dir_list) - int delete_object(const char *path) - { - char *encoded = curl_escape(path, 0); -- int response = send_request("DELETE", encoded, NULL, NULL); -+ int response = send_request("DELETE", encoded, NULL, NULL, NULL); - curl_free(encoded); - return (response >= 200 && response < 300); - } - -+int copy_object(const char *src, const char *dst) -+{ -+ char *dst_encoded = curl_escape(dst, 0); -+ curl_slist *headers = NULL; -+ add_header(&headers, "X-Copy-From", src); -+ add_header(&headers, "Content-Length", "0"); -+ int response = send_request("PUT", dst_encoded, NULL, NULL, headers); -+ curl_free(dst_encoded); -+ curl_slist_free_all(headers); -+ return (response >= 200 && response < 300); -+} -+ - int create_directory(const char *path) - { - char *encoded = curl_escape(path, 0); -- int response = send_request("MKDIR", encoded, NULL, NULL); -+ int response = send_request("MKDIR", encoded, NULL, NULL, NULL); - curl_free(encoded); - return (response >= 200 && response < 300); - } -diff --git a/cloudfsapi.h b/cloudfsapi.h -index 19c7bf2..428fad0 100644 ---- a/cloudfsapi.h -+++ b/cloudfsapi.h -@@ -28,6 +28,7 @@ int object_read_fp(const char *path, FILE *fp); - int object_write_fp(const char *path, FILE *fp); - int list_directory(const char *path, dir_entry **); - int delete_object(const char *path); -+int copy_object(const char *src, const char *dst); - int create_directory(const char *label); - int cloudfs_connect(char *username, char *password, char *authurl, int snet_rewrite); - void cloudfs_debug(int dbg); -diff --git a/cloudfuse.c b/cloudfuse.c -index 7ca29a4..d04fece 100644 ---- a/cloudfuse.c -+++ b/cloudfuse.c -@@ -387,6 +387,20 @@ static int cfs_chmod(const char *path, mode_t mode) - return 0; - } - -+static int cfs_rename(const char *src, const char *dst) -+{ -+ dir_entry *src_de = path_info(src); -+ if (!src_de) -+ return -ENOENT; -+ if (copy_object(src, dst)) -+ { -+ /* FIXME this isn't quite right as doesn't preserve last modified */ -+ update_dir_cache(dst, src_de->size, 0); -+ return cfs_unlink(src); -+ } -+ return -EIO; -+} -+ - char *get_home_dir() - { - char *home; -@@ -489,6 +503,7 @@ int main(int argc, char **argv) - .statfs = cfs_statfs, - .chmod = cfs_chmod, - .chown = cfs_chown, -+ .rename = cfs_rename, - }; - - pthread_mutex_init(&dmut, NULL); --- -1.7.9.5 - diff --git a/debian/patches/0009-add-contributors-to-README.txt b/debian/patches/0009-add-contributors-to-README.txt deleted file mode 100644 index d4f64f8..0000000 --- a/debian/patches/0009-add-contributors-to-README.txt +++ /dev/null @@ -1,30 +0,0 @@ -From be9f18d67d3337423e5a1c27212b02e8dbe3291a Mon Sep 17 00:00:00 2001 -From: Mike Barton -Date: Fri, 12 Aug 2011 10:30:12 +0000 -Subject: [PATCH 09/17] add contributors to README - ---- - README | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/README b/README -index bcdbad5..451eae1 100644 ---- a/README -+++ b/README -@@ -73,6 +73,13 @@ BUGS/SHORTCOMINGS: - cloudfuse won't list more than that many files in a single directory. - - -+AWESOME CONTRIBUTORS: -+ -+ * Tim Dysinger fixed the Makefile https://github.com/dysinger -+ * Chris Wedgwood made du work by fixing stat https://github.com/cwedgwood -+ * Nick Craig-Wood implemented rename https://github.com/ncw -+ -+ - Thanks, and I hope you find it useful. - - Michael Barton --- -1.7.9.5 - diff --git a/debian/patches/0010-protect-directories-from-rename.txt b/debian/patches/0010-protect-directories-from-rename.txt deleted file mode 100644 index b523cbf..0000000 --- a/debian/patches/0010-protect-directories-from-rename.txt +++ /dev/null @@ -1,41 +0,0 @@ -From ad9f1246b6c63c380f67c5af2144f87091dea3ed Mon Sep 17 00:00:00 2001 -From: Mike Barton -Date: Fri, 12 Aug 2011 10:41:08 +0000 -Subject: [PATCH 10/17] protect directories from rename - ---- - README | 4 +--- - cloudfuse.c | 2 ++ - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/README b/README -index 451eae1..7da4e6d 100644 ---- a/README -+++ b/README -@@ -58,9 +58,7 @@ USE: - - BUGS/SHORTCOMINGS: - -- * Doesn't implement rename(). There's no good way to do this with the -- Cloud Files API. Unfortunately, this makes cloudfuse considerably less -- useful in Finder, as it expects to be able to rename a lot. -+ * rename() doesn't work on directories (and probably never will). - * When reading and writing files, it buffers them in a local temp file. - * It keeps an in-memory cache of the directory structure, so it may not be - usable for large file systems. Also, files added by other applications -diff --git a/cloudfuse.c b/cloudfuse.c -index d04fece..af8bfc8 100644 ---- a/cloudfuse.c -+++ b/cloudfuse.c -@@ -392,6 +392,8 @@ static int cfs_rename(const char *src, const char *dst) - dir_entry *src_de = path_info(src); - if (!src_de) - return -ENOENT; -+ if (src_de->isdir) -+ return -EISDIR; - if (copy_object(src, dst)) - { - /* FIXME this isn't quite right as doesn't preserve last modified */ --- -1.7.9.5 - diff --git a/debian/patches/0011-arrange-code-back-to-my-preference.txt b/debian/patches/0011-arrange-code-back-to-my-preference.txt deleted file mode 100644 index 2385357..0000000 --- a/debian/patches/0011-arrange-code-back-to-my-preference.txt +++ /dev/null @@ -1,121 +0,0 @@ -From 57a4969ef39427e23232c8ecbcbf90b6f57343d7 Mon Sep 17 00:00:00 2001 -From: Mike Barton -Date: Fri, 12 Aug 2011 10:55:01 +0000 -Subject: [PATCH 11/17] arrange code back to my preference ;) - ---- - README | 1 + - cloudfuse.c | 36 +++++++++++++++++++++++++++++++++++- - cloudfuse.h | 34 ---------------------------------- - 3 files changed, 36 insertions(+), 35 deletions(-) - delete mode 100644 cloudfuse.h - -diff --git a/README b/README -index 7da4e6d..bc2bf04 100644 ---- a/README -+++ b/README -@@ -76,6 +76,7 @@ AWESOME CONTRIBUTORS: - * Tim Dysinger fixed the Makefile https://github.com/dysinger - * Chris Wedgwood made du work by fixing stat https://github.com/cwedgwood - * Nick Craig-Wood implemented rename https://github.com/ncw -+ * Dillon Amburgey made it compile on clang https://github.com/dillona - - - Thanks, and I hope you find it useful. -diff --git a/cloudfuse.c b/cloudfuse.c -index 6149338..bf7e195 100644 ---- a/cloudfuse.c -+++ b/cloudfuse.c -@@ -16,7 +16,27 @@ - #include - #include "cloudfsapi.h" - #include "config.h" --#include "cloudfuse.h" -+ -+ -+#define OPTION_SIZE 1024 -+ -+static int cache_timeout; -+ -+typedef struct dir_cache -+{ -+ char *path; -+ dir_entry *entries; -+ time_t cached; -+ struct dir_cache *next, *prev; -+} dir_cache; -+static dir_cache *dcache; -+static pthread_mutex_t dmut; -+ -+typedef struct -+{ -+ int fd; -+ int flags; -+} openfile; - - - static void dir_for(const char *path, char *dir) -@@ -397,6 +417,20 @@ char *get_home_dir() - return "~"; - } - -+static struct options { -+ char username[OPTION_SIZE]; -+ char api_key[OPTION_SIZE]; -+ char cache_timeout[OPTION_SIZE]; -+ char authurl[OPTION_SIZE]; -+ char use_snet[OPTION_SIZE]; -+} options = { -+ .username = "", -+ .api_key = "", -+ .cache_timeout = "600", -+ .authurl = "https://auth.api.rackspacecloud.com/v1.0", -+ .use_snet = "false", -+}; -+ - int parse_option(void *data, const char *arg, int key, struct fuse_args *outargs) - { - if (sscanf(arg, " username = %[^\r\n ]", options.username) || -diff --git a/cloudfuse.h b/cloudfuse.h -deleted file mode 100644 -index 2572be2..0000000 ---- a/cloudfuse.h -+++ /dev/null -@@ -1,34 +0,0 @@ --#define OPTION_SIZE 1024 -- --static int cache_timeout; -- --typedef struct dir_cache --{ -- char *path; -- dir_entry *entries; -- time_t cached; -- struct dir_cache *next, *prev; --} dir_cache; --static dir_cache *dcache; --static pthread_mutex_t dmut; -- --typedef struct --{ -- int fd; -- int flags; --} openfile; -- --struct options { -- char username[OPTION_SIZE]; -- char api_key[OPTION_SIZE]; -- char cache_timeout[OPTION_SIZE]; -- char authurl[OPTION_SIZE]; -- char use_snet[OPTION_SIZE]; --} options = { -- .username = "", -- .api_key = "", -- .cache_timeout = "600", -- .authurl = "https://auth.api.rackspacecloud.com/v1.0", -- .use_snet = "false", --}; -- --- -1.7.9.5 - diff --git a/debian/patches/0012-remove-deprecated-unneeded-include.txt b/debian/patches/0012-remove-deprecated-unneeded-include.txt deleted file mode 100644 index 25a50a6..0000000 --- a/debian/patches/0012-remove-deprecated-unneeded-include.txt +++ /dev/null @@ -1,25 +0,0 @@ -From fd960fbb3b4c9e29f7109e7963ddf1105911a7a8 Mon Sep 17 00:00:00 2001 -From: Mike Lundy -Date: Wed, 31 Aug 2011 15:50:06 -0700 -Subject: [PATCH 12/17] remove deprecated, unneeded include - -libcurl removed this header completely (it hasn't used it for ~7 years) ---- - cloudfsapi.h | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/cloudfsapi.h b/cloudfsapi.h -index ff443f7..54a5871 100644 ---- a/cloudfsapi.h -+++ b/cloudfsapi.h -@@ -2,7 +2,6 @@ - #define _CLOUDFSAPI_H - - #include --#include - #include - - #define BUFFER_INITIAL_SIZE 4096 --- -1.7.9.5 - diff --git a/debian/patches/0013-add-openssl-to-the-configure-discovery.txt b/debian/patches/0013-add-openssl-to-the-configure-discovery.txt deleted file mode 100644 index 2eb187a..0000000 --- a/debian/patches/0013-add-openssl-to-the-configure-discovery.txt +++ /dev/null @@ -1,41 +0,0 @@ -From f23367e19c3ca77694d100b6a1ac3d00125e59b4 Mon Sep 17 00:00:00 2001 -From: Mike Lundy -Date: Wed, 31 Aug 2011 15:57:44 -0700 -Subject: [PATCH 13/17] add openssl to the configure discovery - ---- - Makefile.in | 4 ++-- - configure.in | 1 + - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/Makefile.in b/Makefile.in -index ab64bc0..05a22c5 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -2,9 +2,9 @@ - .SUFFIXES: .c .o - - CC = @CC@ --CFLAGS = @CFLAGS@ @XML_CFLAGS@ @CURL_CFLAGS@ @FUSE_CFLAGS@ -+CFLAGS = @CFLAGS@ @XML_CFLAGS@ @CURL_CFLAGS@ @FUSE_CFLAGS@ @OPENSSL_CFLAGS@ - LDFLAGS = @LDFLAGS@ --LIBS = @LIBS@ @XML_LIBS@ @CURL_LIBS@ @FUSE_LIBS@ -+LIBS = @LIBS@ @XML_LIBS@ @CURL_LIBS@ @FUSE_LIBS@ @OPENSSL_LIBS@ - INSTALL = @INSTALL@ - MKDIR_P = @MKDIR_P@ - prefix = @prefix@ -diff --git a/configure.in b/configure.in -index 9353ea3..1289317 100644 ---- a/configure.in -+++ b/configure.in -@@ -17,6 +17,7 @@ AC_PROG_MKDIR_P - PKG_CHECK_MODULES(XML, libxml-2.0, , AC_MSG_ERROR('Unable to find libxml2. Please make sure library and header files are installed.')) - PKG_CHECK_MODULES(CURL, libcurl, , AC_MSG_ERROR('Unable to find libcurl. Please make sure library and header files are installed.')) - PKG_CHECK_MODULES(FUSE, fuse, , AC_MSG_ERROR('Unable to find libfuse. Please make sure library and header files are installed.')) -+PKG_CHECK_MODULES(OPENSSL, openssl, , []) - - # Checks for header files. - AC_FUNC_ALLOCA --- -1.7.9.5 - diff --git a/debian/patches/0014-regenerate-configure.txt b/debian/patches/0014-regenerate-configure.txt deleted file mode 100644 index 14eaad6..0000000 --- a/debian/patches/0014-regenerate-configure.txt +++ /dev/null @@ -1,8888 +0,0 @@ -From d0da9a0a6eedbcde3744074e58da85293e91f297 Mon Sep 17 00:00:00 2001 -From: Mike Lundy -Date: Wed, 31 Aug 2011 15:58:28 -0700 -Subject: [PATCH 14/17] regenerate configure - ---- - config.h.in | 5 +- - configure | 6602 +++++++++++++++++++++++++---------------------------------- - 2 files changed, 2747 insertions(+), 3860 deletions(-) - -diff --git a/config.h.in b/config.h.in -index c72d0b5..05a3799 100644 ---- a/config.h.in -+++ b/config.h.in -@@ -88,7 +88,7 @@ - /* Define to 1 if you have the `strstr' function. */ - #undef HAVE_STRSTR - --/* Define to 1 if `st_blocks' is member of `struct stat'. */ -+/* Define to 1 if `st_blocks' is a member of `struct stat'. */ - #undef HAVE_STRUCT_STAT_ST_BLOCKS - - /* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use -@@ -122,6 +122,9 @@ - /* Define to the one symbol short name of this package. */ - #undef PACKAGE_TARNAME - -+/* Define to the home page for this package. */ -+#undef PACKAGE_URL -+ - /* Define to the version of this package. */ - #undef PACKAGE_VERSION - -diff --git a/configure b/configure -index 0599a50..3691c78 100755 ---- a/configure -+++ b/configure -@@ -1,62 +1,85 @@ - #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.61 for cloudfuse 0.9. -+# Generated by GNU Autoconf 2.68 for cloudfuse 0.9. - # - # Report bugs to >. - # -+# - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, --# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -+# Foundation, Inc. -+# -+# - # This configure script is free software; the Free Software Foundation - # gives unlimited permission to copy, distribute and modify it. --## --------------------- ## --## M4sh Initialization. ## --## --------------------- ## -+## -------------------- ## -+## M4sh Initialization. ## -+## -------------------- ## - - # Be more Bourne compatible - DUALCASE=1; export DUALCASE # for MKS sh --if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: -- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which -+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST - else -- case `(set -o) 2>/dev/null` in -- *posix*) set -o posix ;; -+ case `(set -o) 2>/dev/null` in #( -+ *posix*) : -+ set -o posix ;; #( -+ *) : -+ ;; - esac -- - fi - - -- -- --# PATH needs CR --# Avoid depending upon Character Ranges. --as_cr_letters='abcdefghijklmnopqrstuvwxyz' --as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' --as_cr_Letters=$as_cr_letters$as_cr_LETTERS --as_cr_digits='0123456789' --as_cr_alnum=$as_cr_Letters$as_cr_digits -- --# The user is always right. --if test "${PATH_SEPARATOR+set}" != set; then -- echo "#! /bin/sh" >conf$$.sh -- echo "exit 0" >>conf$$.sh -- chmod +x conf$$.sh -- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then -- PATH_SEPARATOR=';' -+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 -- PATH_SEPARATOR=: -+ 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 -- rm -f conf$$.sh -+ export as_echo_body -+ as_echo='sh -c $as_echo_body as_echo' - fi - --# Support unset when possible. --if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then -- as_unset=unset --else -- as_unset=false -+# 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 - - -@@ -65,20 +88,19 @@ fi - # 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.) --as_nl=' --' - IFS=" "" $as_nl" - - # Find who we are. Look in the path if we contain no directory separator. --case $0 in -+as_myself= -+case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR - for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break --done -+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -+ done - IFS=$as_save_IFS - - ;; -@@ -89,32 +111,278 @@ if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then -- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 -- { (exit 1); exit 1; } -+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 -+ exit 1 - fi - --# Work around bugs in pre-3.0 UWIN ksh. --for as_var in ENV MAIL MAILPATH --do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -+# Unset variables that we do not need and which cause bugs (e.g. in -+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -+# suppresses any "Segmentation fault" message there. '((' could -+# trigger a bug in pdksh 5.2.14. -+for as_var in BASH_ENV ENV MAIL MAILPATH -+do eval test x\${$as_var+set} = xset \ -+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : - done - PS1='$ ' - PS2='> ' - PS4='+ ' - - # NLS nuisances. --for as_var in \ -- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ -- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ -- LC_TELEPHONE LC_TIME -+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 -+test \$(( 1 + 1 )) = 2 || exit 1" -+ if (eval "$as_required") 2>/dev/null; then : -+ as_have_required=yes -+else -+ as_have_required=no -+fi -+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -+ -+else -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+as_found=false -+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH - do -- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then -- eval $as_var=C; export $as_var -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ as_found=: -+ case $as_dir in #( -+ /*) -+ for as_base in sh bash ksh sh5; do -+ # Try only shells that exist, to save several forks. -+ as_shell=$as_dir/$as_base -+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } && -+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : -+ CONFIG_SHELL=$as_shell as_have_required=yes -+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : -+ break 2 -+fi -+fi -+ done;; -+ esac -+ as_found=false -+done -+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && -+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : -+ CONFIG_SHELL=$SHELL as_have_required=yes -+fi; } -+IFS=$as_save_IFS -+ -+ -+ if test "x$CONFIG_SHELL" != x; then : -+ # We cannot yet assume a decent shell, so we have to provide a -+ # neutralization value for shells without unset; and this also -+ # works around shells that cannot unset nonexistent variables. -+ # Preserve -v and -x to the replacement shell. -+ BASH_ENV=/dev/null -+ ENV=/dev/null -+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -+ export CONFIG_SHELL -+ case $- in # (((( -+ *v*x* | *x*v* ) as_opts=-vx ;; -+ *v* ) as_opts=-v ;; -+ *x* ) as_opts=-x ;; -+ * ) as_opts= ;; -+ esac -+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} -+fi -+ -+ if test x$as_have_required = xno; then : -+ $as_echo "$0: This script requires a shell more modern than all" -+ $as_echo "$0: the shells that I found on your system." -+ if test x${ZSH_VERSION+set} = xset ; then -+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" -+ $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else -- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -+ $as_echo "$0: Please tell bug-autoconf@gnu.org and Michael -+$0: Barton about your system, -+$0: including any error possibly output before this -+$0: message. Then install a modern shell, or manually run -+$0: the script under such a shell if you do have one." - fi --done -+ exit 1 -+fi -+fi -+fi -+SHELL=${CONFIG_SHELL-/bin/sh} -+export SHELL -+# Unset more variables known to interfere with behavior of common tools. -+CLICOLOR_FORCE= GREP_OPTIONS= -+unset CLICOLOR_FORCE GREP_OPTIONS -+ -+## --------------------- ## -+## M4sh Shell Functions. ## -+## --------------------- ## -+# as_fn_unset VAR -+# --------------- -+# Portably unset VAR. -+as_fn_unset () -+{ -+ { eval $1=; unset $1;} -+} -+as_unset=as_fn_unset -+ -+# as_fn_set_status STATUS -+# ----------------------- -+# Set $? to STATUS, without forking. -+as_fn_set_status () -+{ -+ return $1 -+} # as_fn_set_status -+ -+# as_fn_exit STATUS -+# ----------------- -+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -+as_fn_exit () -+{ -+ set +e -+ as_fn_set_status $1 -+ exit $1 -+} # as_fn_exit -+ -+# as_fn_mkdir_p -+# ------------- -+# Create "$as_dir" as a directory, including parents if necessary. -+as_fn_mkdir_p () -+{ -+ -+ case $as_dir in #( -+ -*) as_dir=./$as_dir;; -+ esac -+ test -d "$as_dir" || eval $as_mkdir_p || { -+ as_dirs= -+ while :; do -+ case $as_dir in #( -+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( -+ *) as_qdir=$as_dir;; -+ esac -+ as_dirs="'$as_qdir' $as_dirs" -+ as_dir=`$as_dirname -- "$as_dir" || -+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -+ X"$as_dir" : 'X\(//\)[^/]' \| \ -+ X"$as_dir" : 'X\(//\)$' \| \ -+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -+$as_echo X"$as_dir" | -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)[^/].*/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\).*/{ -+ s//\1/ -+ q -+ } -+ s/.*/./; q'` -+ test -d "$as_dir" && break -+ done -+ test -z "$as_dirs" || eval "mkdir $as_dirs" -+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" -+ -+ -+} # as_fn_mkdir_p -+# as_fn_append VAR VALUE -+# ---------------------- -+# Append the text in VALUE to the end of the definition contained in VAR. Take -+# advantage of any shell optimizations that allow amortized linear growth over -+# repeated appends, instead of the typical quadratic growth present in naive -+# implementations. -+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : -+ eval 'as_fn_append () -+ { -+ eval $1+=\$2 -+ }' -+else -+ as_fn_append () -+ { -+ eval $1=\$$1\$2 -+ } -+fi # as_fn_append -+ -+# as_fn_arith ARG... -+# ------------------ -+# Perform arithmetic evaluation on the ARGs, and store the result in the -+# global $as_val. Take advantage of shells that can avoid forks. The arguments -+# must be portable across $(()) and expr. -+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : -+ eval 'as_fn_arith () -+ { -+ as_val=$(( $* )) -+ }' -+else -+ as_fn_arith () -+ { -+ as_val=`expr "$@" || test $? -eq 1` -+ } -+fi # as_fn_arith -+ -+ -+# as_fn_error STATUS ERROR [LINENO LOG_FD] -+# ---------------------------------------- -+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -+# script with STATUS, using 1 if that was 0. -+as_fn_error () -+{ -+ as_status=$1; test $as_status -eq 0 && as_status=1 -+ if test "$4"; then -+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 -+ fi -+ $as_echo "$as_me: error: $2" >&2 -+ as_fn_exit $as_status -+} # as_fn_error - --# Required to use basename. - if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -@@ -128,13 +396,17 @@ else - as_basename=false - fi - -+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then -+ as_dirname=dirname -+else -+ as_dirname=false -+fi - --# Name of the executable. - as_me=`$as_basename -- "$0" || - $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || --echo X/"$0" | -+$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q -@@ -149,412 +421,127 @@ echo X/"$0" | - } - s/.*/./; q'` - --# CDPATH. --$as_unset CDPATH -+# Avoid depending upon Character Ranges. -+as_cr_letters='abcdefghijklmnopqrstuvwxyz' -+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -+as_cr_Letters=$as_cr_letters$as_cr_LETTERS -+as_cr_digits='0123456789' -+as_cr_alnum=$as_cr_Letters$as_cr_digits - - --if test "x$CONFIG_SHELL" = x; then -- if (eval ":") 2>/dev/null; then -- as_have_required=yes --else -- as_have_required=no --fi -+ 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; } - -- if test $as_have_required = yes && (eval ": --(as_func_return () { -- (exit \$1) --} --as_func_success () { -- as_func_return 0 --} --as_func_failure () { -- as_func_return 1 --} --as_func_ret_success () { -- return 0 --} --as_func_ret_failure () { -- return 1 -+ # 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 - } - --exitcode=0 --if as_func_success; then -- : --else -- exitcode=1 -- echo as_func_success failed. --fi -- --if as_func_failure; then -- exitcode=1 -- echo as_func_failure succeeded. --fi -+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 - --if as_func_ret_success; then -- : -+rm -f conf$$ conf$$.exe conf$$.file -+if test -d conf$$.dir; then -+ rm -f conf$$.dir/conf$$.file - else -- exitcode=1 -- echo as_func_ret_success failed. --fi -- --if as_func_ret_failure; then -- exitcode=1 -- echo as_func_ret_failure succeeded. --fi -- --if ( set x; as_func_ret_success y && test x = \"\$1\" ); then -- : -+ 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 -- exitcode=1 -- echo positional parameters were not saved. -+ as_ln_s='cp -p' - fi -+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -+rmdir conf$$.dir 2>/dev/null - --test \$exitcode = 0) || { (exit 1); exit 1; } -- --( -- as_lineno_1=\$LINENO -- as_lineno_2=\$LINENO -- test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && -- test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } --") 2> /dev/null; then -- : -+if mkdir -p . 2>/dev/null; then -+ as_mkdir_p='mkdir -p "$as_dir"' - else -- as_candidate_shells= -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- case $as_dir in -- /*) -- for as_base in sh bash ksh sh5; do -- as_candidate_shells="$as_candidate_shells $as_dir/$as_base" -- done;; -- esac --done --IFS=$as_save_IFS -- -+ test -d ./-p && rmdir ./-p -+ as_mkdir_p=false -+fi - -- for as_shell in $as_candidate_shells $SHELL; do -- # Try only shells that exist, to save several forks. -- if { test -f "$as_shell" || test -f "$as_shell.exe"; } && -- { ("$as_shell") 2> /dev/null <<\_ASEOF --if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -- emulate sh -- NULLCMD=: -- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which -- # is contrary to our usage. Disable this feature. -- alias -g '${1+"$@"}'='"$@"' -- setopt NO_GLOB_SUBST -+if test -x / >/dev/null 2>&1; then -+ as_test_x='test -x' - else -- case `(set -o) 2>/dev/null` in -- *posix*) set -o posix ;; --esac -- -+ 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'" - --: --_ASEOF --}; then -- CONFIG_SHELL=$as_shell -- as_have_required=yes -- if { "$as_shell" 2> /dev/null <<\_ASEOF --if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -- emulate sh -- NULLCMD=: -- # Zsh 3.x and 4.x performs 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 -+# Sed expression to map a string onto a valid variable name. -+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - --fi - -- --: --(as_func_return () { -- (exit $1) --} --as_func_success () { -- as_func_return 0 --} --as_func_failure () { -- as_func_return 1 --} --as_func_ret_success () { -- return 0 --} --as_func_ret_failure () { -- return 1 --} -- --exitcode=0 --if as_func_success; then -- : --else -- exitcode=1 -- echo as_func_success failed. --fi -- --if as_func_failure; then -- exitcode=1 -- echo as_func_failure succeeded. --fi -- --if as_func_ret_success; then -- : --else -- exitcode=1 -- echo as_func_ret_success failed. --fi -- --if as_func_ret_failure; then -- exitcode=1 -- echo as_func_ret_failure succeeded. --fi -- --if ( set x; as_func_ret_success y && test x = "$1" ); then -- : --else -- exitcode=1 -- echo positional parameters were not saved. --fi -- --test $exitcode = 0) || { (exit 1); exit 1; } -- --( -- as_lineno_1=$LINENO -- as_lineno_2=$LINENO -- test "x$as_lineno_1" != "x$as_lineno_2" && -- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } -- --_ASEOF --}; then -- break --fi -- --fi -- -- done -- -- if test "x$CONFIG_SHELL" != x; then -- for as_var in BASH_ENV ENV -- do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -- done -- export CONFIG_SHELL -- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} --fi -- -- -- if test $as_have_required = no; then -- echo This script requires a shell more modern than all the -- echo shells that I found on your system. Please install a -- echo modern shell, or manually run the script under such a -- echo shell if you do have one. -- { (exit 1); exit 1; } --fi -- -- --fi -- --fi -- -- -- --(eval "as_func_return () { -- (exit \$1) --} --as_func_success () { -- as_func_return 0 --} --as_func_failure () { -- as_func_return 1 --} --as_func_ret_success () { -- return 0 --} --as_func_ret_failure () { -- return 1 --} -- --exitcode=0 --if as_func_success; then -- : --else -- exitcode=1 -- echo as_func_success failed. --fi -- --if as_func_failure; then -- exitcode=1 -- echo as_func_failure succeeded. --fi -- --if as_func_ret_success; then -- : --else -- exitcode=1 -- echo as_func_ret_success failed. --fi -- --if as_func_ret_failure; then -- exitcode=1 -- echo as_func_ret_failure succeeded. --fi -- --if ( set x; as_func_ret_success y && test x = \"\$1\" ); then -- : --else -- exitcode=1 -- echo positional parameters were not saved. --fi -- --test \$exitcode = 0") || { -- echo No shell found that supports shell functions. -- echo Please tell autoconf@gnu.org about your system, -- echo including any error possibly output before this -- echo message --} -- -- -- -- as_lineno_1=$LINENO -- as_lineno_2=$LINENO -- test "x$as_lineno_1" != "x$as_lineno_2" && -- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { -- -- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO -- # uniformly replaced by the line number. The first 'sed' inserts a -- # line-number line after each line using $LINENO; the second 'sed' -- # does the real work. The second script uses 'N' to pair each -- # line-number line with the line containing $LINENO, and appends -- # trailing '-' during substitution so that $LINENO is not a special -- # case at line end. -- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the -- # scripts with optimization help from Paolo Bonzini. Blame Lee -- # E. McMahon (1931-1989) for sed's syntax. :-) -- sed -n ' -- p -- /[$]LINENO/= -- ' <$as_myself | -- sed ' -- s/[$]LINENO.*/&-/ -- t lineno -- b -- :lineno -- N -- :loop -- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ -- t loop -- s/-\n.*// -- ' >$as_me.lineno && -- chmod +x "$as_me.lineno" || -- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 -- { (exit 1); exit 1; }; } -- -- # Don't try to exec as it changes $[0], causing all sort of problems -- # (the dirname of $[0] is not the place where we might find the -- # original and so on. Autoconf is especially sensitive to this). -- . "./$as_me.lineno" -- # Exit status is that of the last command. -- exit --} -- -- --if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then -- as_dirname=dirname --else -- as_dirname=false --fi -- --ECHO_C= ECHO_N= ECHO_T= --case `echo -n x` in ---n*) -- case `echo 'x\c'` in -- *c*) ECHO_T=' ';; # ECHO_T is single tab character. -- *) ECHO_C='\c';; -- esac;; --*) -- ECHO_N='-n';; --esac -- --if expr a : '\(a\)' >/dev/null 2>&1 && -- test "X`expr 00001 : '.*\(...\)'`" = X001; then -- as_expr=expr --else -- as_expr=false --fi -- --rm -f conf$$ conf$$.exe conf$$.file --if test -d conf$$.dir; then -- rm -f conf$$.dir/conf$$.file --else -- rm -f conf$$.dir -- mkdir conf$$.dir --fi --echo >conf$$.file --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 --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=: --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 7<&0 &1 -+test -n "$DJDIR" || exec 7<&0 &1 - - # Name of the host. --# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, - # so uname gets run too. - ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -@@ -569,7 +556,6 @@ cross_compiling=no - subdirs= - MFLAGS= - MAKEFLAGS= --SHELL=${CONFIG_SHELL-/bin/sh} - - # Identity of this package. - PACKAGE_NAME='cloudfuse' -@@ -577,6 +563,7 @@ PACKAGE_TARNAME='cloudfuse' - PACKAGE_VERSION='0.9' - PACKAGE_STRING='cloudfuse 0.9' - PACKAGE_BUGREPORT='Michael Barton' -+PACKAGE_URL='' - - ac_unique_file="cloudfuse.c" - # Factoring default headers for most tests. -@@ -617,67 +604,76 @@ ac_includes_default="\ - - ac_header_list= - ac_func_list= --ac_subst_vars='SHELL --PATH_SEPARATOR --PACKAGE_NAME --PACKAGE_TARNAME --PACKAGE_VERSION --PACKAGE_STRING --PACKAGE_BUGREPORT --exec_prefix --prefix --program_transform_name --bindir --sbindir --libexecdir --datarootdir --datadir --sysconfdir --sharedstatedir --localstatedir --includedir --oldincludedir --docdir --infodir --htmldir --dvidir --pdfdir --psdir --libdir --localedir --mandir --DEFS --ECHO_C --ECHO_N --ECHO_T --LIBS --build_alias --host_alias --target_alias --CC --CFLAGS --LDFLAGS --CPPFLAGS --ac_ct_CC --EXEEXT --OBJEXT --INSTALL_PROGRAM --INSTALL_SCRIPT --INSTALL_DATA --PKG_CONFIG --XML_CFLAGS --XML_LIBS --CURL_CFLAGS --CURL_LIBS --FUSE_CFLAGS --FUSE_LIBS -+ac_subst_vars='LTLIBOBJS -+LIBOBJS - ALLOCA --CPP --GREP - EGREP --LIBOBJS --LTLIBOBJS' -+GREP -+CPP -+OPENSSL_LIBS -+OPENSSL_CFLAGS -+FUSE_LIBS -+FUSE_CFLAGS -+CURL_LIBS -+CURL_CFLAGS -+XML_LIBS -+XML_CFLAGS -+PKG_CONFIG_LIBDIR -+PKG_CONFIG_PATH -+PKG_CONFIG -+MKDIR_P -+INSTALL_DATA -+INSTALL_SCRIPT -+INSTALL_PROGRAM -+OBJEXT -+EXEEXT -+ac_ct_CC -+CPPFLAGS -+LDFLAGS -+CFLAGS -+CC -+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 -+' - ac_precious_vars='build_alias - host_alias - target_alias -@@ -687,18 +683,25 @@ LDFLAGS - LIBS - CPPFLAGS - PKG_CONFIG -+PKG_CONFIG_PATH -+PKG_CONFIG_LIBDIR - XML_CFLAGS - XML_LIBS - CURL_CFLAGS - CURL_LIBS - FUSE_CFLAGS - FUSE_LIBS --CPP' -+OPENSSL_CFLAGS -+OPENSSL_LIBS -+CPP -+CPPFLAGS' - - - # 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 -@@ -754,8 +757,9 @@ do - fi - - case $ac_option in -- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; -- *) ac_optarg=yes ;; -+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; -+ *=) ac_optarg= ;; -+ *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. -@@ -797,13 +801,20 @@ do - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) -- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` -+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. -- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && -- { echo "$as_me: error: invalid feature name: $ac_feature" >&2 -- { (exit 1); exit 1; }; } -- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` -- eval enable_$ac_feature=no ;; -+ 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 ;; -@@ -816,13 +827,20 @@ do - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) -- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` -+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. -- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && -- { echo "$as_me: error: invalid feature name: $ac_feature" >&2 -- { (exit 1); exit 1; }; } -- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` -- eval enable_$ac_feature=\$ac_optarg ;; -+ 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- \ -@@ -1013,22 +1031,36 @@ do - ac_init_version=: ;; - - -with-* | --with-*) -- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` -+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. -- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && -- { echo "$as_me: error: invalid package name: $ac_package" >&2 -- { (exit 1); exit 1; }; } -- ac_package=`echo $ac_package | sed 's/[-.]/_/g'` -- eval with_$ac_package=\$ac_optarg ;; -+ 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_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` -+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. -- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && -- { echo "$as_me: error: invalid package name: $ac_package" >&2 -- { (exit 1); exit 1; }; } -- ac_package=`echo $ac_package | sed 's/[-.]/_/g'` -- eval with_$ac_package=no ;; -+ 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. -@@ -1048,26 +1080,26 @@ do - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - -- -*) { echo "$as_me: error: unrecognized option: $ac_option --Try \`$0 --help' for more information." >&2 -- { (exit 1); exit 1; }; } -+ -*) as_fn_error $? "unrecognized option: \`$ac_option' -+Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. -- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && -- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 -- { (exit 1); exit 1; }; } -+ case $ac_envvar in #( -+ '' | [0-9]* | *[!_$as_cr_alnum]* ) -+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; -+ esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. -- echo "$as_me: WARNING: you should use --build, --host, --target" >&2 -+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && -- echo "$as_me: WARNING: invalid host type: $ac_option" >&2 -- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} -+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 -+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -@@ -1075,23 +1107,36 @@ done - - if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` -- { echo "$as_me: error: missing argument to $ac_option" >&2 -- { (exit 1); exit 1; }; } -+ as_fn_error $? "missing argument to $ac_option" -+fi -+ -+if test -n "$ac_unrecognized_opts"; then -+ case $enable_option_checking in -+ no) ;; -+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; -+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; -+ esac - fi - --# Be sure to have absolute directory names. -+# 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 -- { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 -- { (exit 1); exit 1; }; } -+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" - done - - # There might be people who depend on the old broken behavior: `$host' -@@ -1105,8 +1150,8 @@ target=$target_alias - if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe -- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. -- If a cross compiler is detected then cross compile mode will be used." >&2 -+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. -+ If a cross compiler is detected then cross compile mode will be used" >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -@@ -1121,23 +1166,21 @@ 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 .` || -- { echo "$as_me: error: Working directory cannot be determined" >&2 -- { (exit 1); exit 1; }; } -+ as_fn_error $? "working directory cannot be determined" - test "X$ac_ls_di" = "X$ac_pwd_ls_di" || -- { echo "$as_me: error: pwd does not report name of working directory" >&2 -- { (exit 1); exit 1; }; } -+ as_fn_error $? "pwd does not report name of working directory" - - - # Find the source files, if location was not specified. - if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. -- ac_confdir=`$as_dirname -- "$0" || --$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -- X"$0" : 'X\(//\)[^/]' \| \ -- X"$0" : 'X\(//\)$' \| \ -- X"$0" : 'X\(/\)' \| . 2>/dev/null || --echo X"$0" | -+ 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 -@@ -1164,13 +1207,11 @@ else - fi - if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." -- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 -- { (exit 1); exit 1; }; } -+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" - fi - ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" - ac_abs_confdir=`( -- cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 -- { (exit 1); exit 1; }; } -+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` - # When building in place, set srcdir=. - if test "$ac_abs_confdir" = "$ac_pwd"; then -@@ -1210,7 +1251,7 @@ Configuration: - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit -- -q, --quiet, --silent do not print \`checking...' messages -+ -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files -@@ -1218,9 +1259,9 @@ Configuration: - - Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX -- [$ac_default_prefix] -+ [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX -- [PREFIX] -+ [PREFIX] - - By default, \`make install' will install all the files in - \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -@@ -1230,25 +1271,25 @@ for instance \`--prefix=\$HOME'. - For better control, use the options below. - - Fine tuning of the installation directories: -- --bindir=DIR user executables [EPREFIX/bin] -- --sbindir=DIR system admin executables [EPREFIX/sbin] -- --libexecdir=DIR program executables [EPREFIX/libexec] -- --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/cloudfuse] -- --htmldir=DIR html documentation [DOCDIR] -- --dvidir=DIR dvi documentation [DOCDIR] -- --pdfdir=DIR pdf documentation [DOCDIR] -- --psdir=DIR ps documentation [DOCDIR] -+ --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/cloudfuse] -+ --htmldir=DIR html documentation [DOCDIR] -+ --dvidir=DIR dvi documentation [DOCDIR] -+ --pdfdir=DIR pdf documentation [DOCDIR] -+ --psdir=DIR ps documentation [DOCDIR] - _ACEOF - - cat <<\_ACEOF -@@ -1267,15 +1308,23 @@ Some influential environment variables: - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l -- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if -+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - PKG_CONFIG path to pkg-config utility -+ PKG_CONFIG_PATH -+ directories to add to pkg-config's search path -+ PKG_CONFIG_LIBDIR -+ path overriding pkg-config's built-in search path - XML_CFLAGS C compiler flags for XML, overriding pkg-config - XML_LIBS linker flags for XML, overriding pkg-config - CURL_CFLAGS C compiler flags for CURL, overriding pkg-config - CURL_LIBS linker flags for CURL, overriding pkg-config - FUSE_CFLAGS C compiler flags for FUSE, overriding pkg-config - FUSE_LIBS linker flags for FUSE, overriding pkg-config -+ OPENSSL_CFLAGS -+ C compiler flags for OPENSSL, overriding pkg-config -+ OPENSSL_LIBS -+ linker flags for OPENSSL, overriding pkg-config - CPP C preprocessor - - Use these variables to override the choices made by `configure' or to help -@@ -1289,15 +1338,17 @@ 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" || 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=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` -+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. -- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` -+ 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/ ;; -@@ -1333,7 +1384,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else -- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 -+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -@@ -1343,21 +1394,487 @@ test -n "$ac_init_help" && exit $ac_status - if $ac_init_version; then - cat <<\_ACEOF - cloudfuse configure 0.9 --generated by GNU Autoconf 2.61 -+generated by GNU Autoconf 2.68 - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, --2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -+Copyright (C) 2010 Free Software Foundation, Inc. - This configure script is free software; the Free Software Foundation - gives unlimited permission to copy, distribute and modify it. - _ACEOF - exit - fi -+ -+## ------------------------ ## -+## Autoconf initialization. ## -+## ------------------------ ## -+ -+# ac_fn_c_try_compile LINENO -+# -------------------------- -+# Try to compile conftest.$ac_ext, and return whether this succeeded. -+ac_fn_c_try_compile () -+{ -+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -+ rm -f conftest.$ac_objext -+ if { { ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -+$as_echo "$ac_try_echo"; } >&5 -+ (eval "$ac_compile") 2>conftest.err -+ ac_status=$? -+ if test -s conftest.err; then -+ grep -v '^ *+' conftest.err >conftest.er1 -+ cat conftest.er1 >&5 -+ mv -f conftest.er1 conftest.err -+ fi -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then : -+ ac_retval=0 -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_retval=1 -+fi -+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -+ as_fn_set_status $ac_retval -+ -+} # ac_fn_c_try_compile -+ -+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -+# ------------------------------------------- -+# Tests whether TYPE exists after having included INCLUDES, setting cache -+# variable VAR accordingly. -+ac_fn_c_check_type () -+{ -+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -+$as_echo_n "checking for $2... " >&6; } -+if eval \${$3+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ eval "$3=no" -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+$4 -+int -+main () -+{ -+if (sizeof ($2)) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+$4 -+int -+main () -+{ -+if (sizeof (($2))) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ -+else -+ eval "$3=yes" -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+eval ac_res=\$$3 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -+$as_echo "$ac_res" >&6; } -+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -+ -+} # ac_fn_c_check_type -+ -+# ac_fn_c_try_cpp LINENO -+# ---------------------- -+# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -+ac_fn_c_try_cpp () -+{ -+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -+ if { { ac_try="$ac_cpp conftest.$ac_ext" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -+$as_echo "$ac_try_echo"; } >&5 -+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err -+ ac_status=$? -+ if test -s conftest.err; then -+ grep -v '^ *+' conftest.err >conftest.er1 -+ cat conftest.er1 >&5 -+ mv -f conftest.er1 conftest.err -+ fi -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } > conftest.i && { -+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -+ test ! -s conftest.err -+ }; then : -+ ac_retval=0 -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_retval=1 -+fi -+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -+ as_fn_set_status $ac_retval -+ -+} # ac_fn_c_try_cpp -+ -+# ac_fn_c_try_run LINENO -+# ---------------------- -+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -+# that executables *can* be run. -+ac_fn_c_try_run () -+{ -+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -+ if { { ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -+$as_echo "$ac_try_echo"; } >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' -+ { { case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -+$as_echo "$ac_try_echo"; } >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; }; then : -+ ac_retval=0 -+else -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_retval=$ac_status -+fi -+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo -+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -+ as_fn_set_status $ac_retval -+ -+} # ac_fn_c_try_run -+ -+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -+# ------------------------------------------------------- -+# Tests whether HEADER exists and can be compiled using the include files in -+# INCLUDES, setting the cache variable VAR accordingly. -+ac_fn_c_check_header_compile () -+{ -+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -+$as_echo_n "checking for $2... " >&6; } -+if eval \${$3+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+$4 -+#include <$2> -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ eval "$3=yes" -+else -+ eval "$3=no" -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+eval ac_res=\$$3 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -+$as_echo "$ac_res" >&6; } -+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -+ -+} # ac_fn_c_check_header_compile -+ -+# ac_fn_c_try_link LINENO -+# ----------------------- -+# Try to link conftest.$ac_ext, and return whether this succeeded. -+ac_fn_c_try_link () -+{ -+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -+ rm -f conftest.$ac_objext conftest$ac_exeext -+ if { { ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -+$as_echo "$ac_try_echo"; } >&5 -+ (eval "$ac_link") 2>conftest.err -+ ac_status=$? -+ if test -s conftest.err; then -+ grep -v '^ *+' conftest.err >conftest.er1 -+ cat conftest.er1 >&5 -+ mv -f conftest.er1 conftest.err -+ fi -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest$ac_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then : -+ ac_retval=0 -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_retval=1 -+fi -+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information -+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would -+ # interfere with the next link command; also delete a directory that is -+ # left behind by Apple's compiler. We do this before executing the actions. -+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo -+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -+ as_fn_set_status $ac_retval -+ -+} # ac_fn_c_try_link -+ -+# ac_fn_c_check_func LINENO FUNC VAR -+# ---------------------------------- -+# Tests whether FUNC exists, setting the cache variable VAR accordingly -+ac_fn_c_check_func () -+{ -+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -+$as_echo_n "checking for $2... " >&6; } -+if eval \${$3+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+/* Define $2 to an innocuous variant, in case declares $2. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $2 innocuous_$2 -+ -+/* System header to define __stub macros and hopefully few prototypes, -+ which can conflict with char $2 (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ -+ -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif -+ -+#undef $2 -+ -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char $2 (); -+/* The GNU C library defines this for functions which it implements -+ to always fail with ENOSYS. Some functions are actually named -+ something starting with __ and the normal name is an alias. */ -+#if defined __stub_$2 || defined __stub___$2 -+choke me -+#endif -+ -+int -+main () -+{ -+return $2 (); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ eval "$3=yes" -+else -+ eval "$3=no" -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+eval ac_res=\$$3 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -+$as_echo "$ac_res" >&6; } -+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -+ -+} # ac_fn_c_check_func -+ -+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -+# ------------------------------------------------------- -+# Tests whether HEADER exists, giving a warning if it cannot be compiled using -+# the include files in INCLUDES and setting the cache variable VAR -+# accordingly. -+ac_fn_c_check_header_mongrel () -+{ -+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -+ if eval \${$3+:} false; then : -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -+$as_echo_n "checking for $2... " >&6; } -+if eval \${$3+:} false; then : -+ $as_echo_n "(cached) " >&6 -+fi -+eval ac_res=\$$3 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -+$as_echo "$ac_res" >&6; } -+else -+ # Is the header compilable? -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -+$as_echo_n "checking $2 usability... " >&6; } -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+$4 -+#include <$2> -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ ac_header_compiler=yes -+else -+ ac_header_compiler=no -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -+$as_echo "$ac_header_compiler" >&6; } -+ -+# Is the header present? -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -+$as_echo_n "checking $2 presence... " >&6; } -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include <$2> -+_ACEOF -+if ac_fn_c_try_cpp "$LINENO"; then : -+ ac_header_preproc=yes -+else -+ ac_header_preproc=no -+fi -+rm -f conftest.err conftest.i conftest.$ac_ext -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -+$as_echo "$ac_header_preproc" >&6; } -+ -+# So? What about this header? -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( -+ yes:no: ) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -+ ;; -+ no:yes:* ) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -+( $as_echo "## ---------------------------------------------------- ## -+## Report this to Michael Barton ## -+## ---------------------------------------------------- ##" -+ ) | sed "s/^/$as_me: WARNING: /" >&2 -+ ;; -+esac -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -+$as_echo_n "checking for $2... " >&6; } -+if eval \${$3+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ eval "$3=\$ac_header_compiler" -+fi -+eval ac_res=\$$3 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -+$as_echo "$ac_res" >&6; } -+fi -+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -+ -+} # ac_fn_c_check_header_mongrel -+ -+# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES -+# ---------------------------------------------------- -+# Tries to find if the field MEMBER exists in type AGGR, after including -+# INCLUDES, setting cache variable VAR accordingly. -+ac_fn_c_check_member () -+{ -+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -+$as_echo_n "checking for $2.$3... " >&6; } -+if eval \${$4+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+$5 -+int -+main () -+{ -+static $2 ac_aggr; -+if (ac_aggr.$3) -+return 0; -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ eval "$4=yes" -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+$5 -+int -+main () -+{ -+static $2 ac_aggr; -+if (sizeof ac_aggr.$3) -+return 0; -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ eval "$4=yes" -+else -+ eval "$4=no" -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+eval ac_res=\$$4 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -+$as_echo "$ac_res" >&6; } -+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -+ -+} # ac_fn_c_check_member - 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 cloudfuse $as_me 0.9, which was --generated by GNU Autoconf 2.61. Invocation command line was -+generated by GNU Autoconf 2.68. Invocation command line was - - $ $0 $@ - -@@ -1393,8 +1910,8 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- echo "PATH: $as_dir" --done -+ $as_echo "PATH: $as_dir" -+ done - IFS=$as_save_IFS - - } >&5 -@@ -1428,12 +1945,12 @@ do - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) -- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; -+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in -- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; -+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) -- ac_configure_args1="$ac_configure_args1 '$ac_arg'" -+ as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else -@@ -1449,13 +1966,13 @@ do - -* ) ac_must_keep_next=true ;; - esac - fi -- ac_configure_args="$ac_configure_args '$ac_arg'" -+ as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done - done --$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } --$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } -+{ ac_configure_args0=; unset ac_configure_args0;} -+{ ac_configure_args1=; unset ac_configure_args1;} - - # When interrupted or exit'd, cleanup temporary files, and complete - # config.log. We remove comments because anyway the quotes in there -@@ -1467,11 +1984,9 @@ trap 'exit_status=$? - { - echo - -- cat <<\_ASBOX --## ---------------- ## -+ $as_echo "## ---------------- ## - ## Cache variables. ## --## ---------------- ## --_ASBOX -+## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, - ( -@@ -1480,12 +1995,13 @@ _ASBOX - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( -- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 --echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; -+ *_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) ;; #( -- *) $as_unset $ac_var ;; -+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( -+ *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done -@@ -1504,134 +2020,142 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - ) - echo - -- cat <<\_ASBOX --## ----------------- ## -+ $as_echo "## ----------------- ## - ## Output variables. ## --## ----------------- ## --_ASBOX -+## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in -- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; -+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac -- echo "$ac_var='\''$ac_val'\''" -+ $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then -- cat <<\_ASBOX --## ------------------- ## -+ $as_echo "## ------------------- ## - ## File substitutions. ## --## ------------------- ## --_ASBOX -+## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in -- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; -+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac -- echo "$ac_var='\''$ac_val'\''" -+ $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then -- cat <<\_ASBOX --## ----------- ## -+ $as_echo "## ----------- ## - ## confdefs.h. ## --## ----------- ## --_ASBOX -+## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && -- echo "$as_me: caught signal $ac_signal" -- echo "$as_me: exit $exit_status" -+ $as_echo "$as_me: caught signal $ac_signal" -+ $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core 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'; { (exit 1); exit 1; }' $ac_signal -+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal - done - ac_signal=0 - - # confdefs.h avoids OS command line length limits that DEFS can exceed. - rm -f -r conftest* confdefs.h - -+$as_echo "/* confdefs.h */" > confdefs.h -+ - # Predefined preprocessor variables. - - cat >>confdefs.h <<_ACEOF - #define PACKAGE_NAME "$PACKAGE_NAME" - _ACEOF - -- - cat >>confdefs.h <<_ACEOF - #define PACKAGE_TARNAME "$PACKAGE_TARNAME" - _ACEOF - -- - cat >>confdefs.h <<_ACEOF - #define PACKAGE_VERSION "$PACKAGE_VERSION" - _ACEOF - -- - cat >>confdefs.h <<_ACEOF - #define PACKAGE_STRING "$PACKAGE_STRING" - _ACEOF - -- - cat >>confdefs.h <<_ACEOF - #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" - _ACEOF - -+cat >>confdefs.h <<_ACEOF -+#define PACKAGE_URL "$PACKAGE_URL" -+_ACEOF -+ - - # Let the site file select an alternate cache file if it wants to. --# Prefer explicitly selected file to automatically selected ones. -+# Prefer an explicitly selected file to automatically selected ones. -+ac_site_file1=NONE -+ac_site_file2=NONE - if test -n "$CONFIG_SITE"; then -- set x "$CONFIG_SITE" -+ # We do not want a PATH search for config.site. -+ case $CONFIG_SITE in #(( -+ -*) ac_site_file1=./$CONFIG_SITE;; -+ */*) ac_site_file1=$CONFIG_SITE;; -+ *) ac_site_file1=./$CONFIG_SITE;; -+ esac - elif test "x$prefix" != xNONE; then -- set x "$prefix/share/config.site" "$prefix/etc/config.site" -+ ac_site_file1=$prefix/share/config.site -+ ac_site_file2=$prefix/etc/config.site - else -- set x "$ac_default_prefix/share/config.site" \ -- "$ac_default_prefix/etc/config.site" -+ ac_site_file1=$ac_default_prefix/share/config.site -+ ac_site_file2=$ac_default_prefix/etc/config.site - fi --shift --for ac_site_file -+for ac_site_file in "$ac_site_file1" "$ac_site_file2" - do -- if test -r "$ac_site_file"; then -- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 --echo "$as_me: loading site script $ac_site_file" >&6;} -+ 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" -+ . "$ac_site_file" \ -+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+as_fn_error $? "failed to load site script $ac_site_file -+See \`config.log' for more details" "$LINENO" 5; } - fi - done - - if test -r "$cache_file"; then -- # Some versions of bash will fail to source /dev/null (special -- # files actually), so we avoid doing that. -- if test -f "$cache_file"; then -- { echo "$as_me:$LINENO: loading cache $cache_file" >&5 --echo "$as_me: loading cache $cache_file" >&6;} -+ # 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 -- { echo "$as_me:$LINENO: creating cache $cache_file" >&5 --echo "$as_me: creating cache $cache_file" >&6;} -+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -+$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file - fi - --ac_header_list="$ac_header_list sys/time.h" --ac_header_list="$ac_header_list unistd.h" --ac_func_list="$ac_func_list alarm" -+as_fn_append ac_header_list " sys/time.h" -+as_fn_append ac_header_list " unistd.h" -+as_fn_append ac_func_list " alarm" - # Check that the precious variables saved in the cache have kept the same - # value. - ac_cache_corrupted=false -@@ -1642,68 +2166,56 @@ for ac_var in $ac_precious_vars; do - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) -- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 --echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} -+ { $as_echo "$as_me:${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) -- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 --echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} -+ { $as_echo "$as_me:${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 -- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 --echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} -- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 --echo "$as_me: former value: $ac_old_val" >&2;} -- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 --echo "$as_me: current value: $ac_new_val" >&2;} -- ac_cache_corrupted=: -+ # differences in whitespace do not lead to failure. -+ ac_old_val_w=`echo x $ac_old_val` -+ ac_new_val_w=`echo x $ac_new_val` -+ if test "$ac_old_val_w" != "$ac_new_val_w"; then -+ { $as_echo "$as_me:${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=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; -+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. -- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; -+ *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi - done - if $ac_cache_corrupted; then -- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 --echo "$as_me: error: changes in the environment can compromise the build" >&2;} -- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 --echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} -- { (exit 1); exit 1; }; } -+ { $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' -@@ -1733,10 +2245,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. - set dummy ${ac_tool_prefix}gcc; ac_word=$2 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_prog_CC+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_prog_CC+:} false; then : -+ $as_echo_n "(cached) " >&6 - else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -@@ -1746,25 +2258,25 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - fi - fi - CC=$ac_cv_prog_CC - if test -n "$CC"; then -- { echo "$as_me:$LINENO: result: $CC" >&5 --echo "${ECHO_T}$CC" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -+$as_echo "$CC" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - -@@ -1773,10 +2285,10 @@ if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. - set dummy gcc; ac_word=$2 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_prog_ac_ct_CC+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_prog_ac_ct_CC+:} false; 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. -@@ -1786,25 +2298,25 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - fi - fi - ac_ct_CC=$ac_cv_prog_ac_ct_CC - if test -n "$ac_ct_CC"; then -- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 --echo "${ECHO_T}$ac_ct_CC" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -+$as_echo "$ac_ct_CC" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - if test "x$ac_ct_CC" = x; then -@@ -1812,12 +2324,8 @@ fi - else - case $cross_compiling:$ac_tool_warned in - yes:) --{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools --whose name does not start with the host triplet. If you think this --configuration is useful to you, please write to autoconf@gnu.org." >&5 --echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools --whose name does not start with the host triplet. If you think this --configuration is useful to you, please write to autoconf@gnu.org." >&2;} -+{ $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 -@@ -1830,10 +2338,10 @@ 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 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_prog_CC+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_prog_CC+:} false; then : -+ $as_echo_n "(cached) " >&6 - else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -@@ -1843,25 +2351,25 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - fi - fi - CC=$ac_cv_prog_CC - if test -n "$CC"; then -- { echo "$as_me:$LINENO: result: $CC" >&5 --echo "${ECHO_T}$CC" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -+$as_echo "$CC" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - -@@ -1870,10 +2378,10 @@ fi - if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. - set dummy cc; ac_word=$2 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_prog_CC+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_prog_CC+:} false; then : -+ $as_echo_n "(cached) " >&6 - else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -@@ -1884,18 +2392,18 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - if test $ac_prog_rejected = yes; then -@@ -1914,11 +2422,11 @@ fi - fi - CC=$ac_cv_prog_CC - if test -n "$CC"; then -- { echo "$as_me:$LINENO: result: $CC" >&5 --echo "${ECHO_T}$CC" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -+$as_echo "$CC" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - -@@ -1929,10 +2437,10 @@ if test -z "$CC"; then - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. - set dummy $ac_tool_prefix$ac_prog; ac_word=$2 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_prog_CC+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_prog_CC+:} false; then : -+ $as_echo_n "(cached) " >&6 - else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -@@ -1942,25 +2450,25 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - fi - fi - CC=$ac_cv_prog_CC - if test -n "$CC"; then -- { echo "$as_me:$LINENO: result: $CC" >&5 --echo "${ECHO_T}$CC" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -+$as_echo "$CC" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - -@@ -1973,10 +2481,10 @@ if test -z "$CC"; then - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_prog_ac_ct_CC+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_prog_ac_ct_CC+:} false; 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. -@@ -1986,25 +2494,25 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - fi - fi - ac_ct_CC=$ac_cv_prog_ac_ct_CC - if test -n "$ac_ct_CC"; then -- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 --echo "${ECHO_T}$ac_ct_CC" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -+$as_echo "$ac_ct_CC" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - -@@ -2016,12 +2524,8 @@ done - else - case $cross_compiling:$ac_tool_warned in - yes:) --{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools --whose name does not start with the host triplet. If you think this --configuration is useful to you, please write to autoconf@gnu.org." >&5 --echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools --whose name does not start with the host triplet. If you think this --configuration is useful to you, please write to autoconf@gnu.org." >&2;} -+{ $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 -@@ -2031,51 +2535,37 @@ fi - fi - - --test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH --See \`config.log' for more details." >&5 --echo "$as_me: error: no acceptable C compiler found in \$PATH --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+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. --echo "$as_me:$LINENO: checking for C compiler version" >&5 --ac_compiler=`set X $ac_compile; echo $2` --{ (ac_try="$ac_compiler --version >&5" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compiler --version >&5") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } --{ (ac_try="$ac_compiler -v >&5" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compiler -v >&5") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } --{ (ac_try="$ac_compiler -V >&5" -+$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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compiler -V >&5") 2>&5 -+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -+$as_echo "$ac_try_echo"; } >&5 -+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } -+ if test -s conftest.err; then -+ sed '10a\ -+... rest of stderr output deleted ... -+ 10q' conftest.err >conftest.er1 -+ cat conftest.er1 >&5 -+ fi -+ rm -f conftest.er1 conftest.err -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+done - --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -2087,42 +2577,38 @@ main () - } - _ACEOF - ac_clean_files_save=$ac_clean_files --ac_clean_files="$ac_clean_files a.out a.exe b.out" -+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" - # Try to create an executable without -o first, disregard a.out. - # It will help us diagnose broken compilers, and finding out an intuition - # of exeext. --{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 --echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } --ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` --# --# List of possible output files, starting from the most likely. --# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) --# only as a last resort. b.out is created by i960 compilers. --ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' --# --# The IRIX 6 linker writes into existing files which may not be --# executable, retaining their permissions. Remove them first so a --# subsequent execution test works. -+{ $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 | *.o | *.obj ) ;; -+ *.$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" -+if { { ac_try="$ac_link_default" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -+$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; then -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. - # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' - # in a Makefile. We should not override ac_cv_exeext if it was cached, -@@ -2132,14 +2618,14 @@ 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 | *.o | *.obj ) -+ *.$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; -+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi -@@ -2158,78 +2644,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= - else - ac_file='' - fi -- --{ echo "$as_me:$LINENO: result: $ac_file" >&5 --echo "${ECHO_T}$ac_file" >&6; } --if test -z "$ac_file"; then -- echo "$as_me: failed program was:" >&5 -+if test -z "$ac_file"; then : -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+$as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --{ { echo "$as_me:$LINENO: error: C compiler cannot create executables --See \`config.log' for more details." >&5 --echo "$as_me: error: C compiler cannot create executables --See \`config.log' for more details." >&2;} -- { (exit 77); exit 77; }; } -+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+as_fn_error 77 "C compiler cannot create executables -+See \`config.log' for more details" "$LINENO" 5; } -+else -+ { $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 - --# Check that the compiler produces executables we can run. If not, either --# the compiler is broken, or we cross compile. --{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 --echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } --# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 --# If not cross compiling, check that we can run a simple program. --if test "$cross_compiling" != yes; then -- if { ac_try='./$ac_file' -- { (case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_try") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- cross_compiling=no -- else -- if test "$cross_compiling" = maybe; then -- cross_compiling=yes -- else -- { { echo "$as_me:$LINENO: error: cannot run C compiled programs. --If you meant to cross compile, use \`--host'. --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run C compiled programs. --If you meant to cross compile, use \`--host'. --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -- fi -- fi --fi --{ echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6; } -- --rm -f a.out a.exe conftest$ac_cv_exeext b.out -+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out - ac_clean_files=$ac_clean_files_save --# Check that the compiler produces executables we can run. If not, either --# the compiler is broken, or we cross compile. --{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 --echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } --{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 --echo "${ECHO_T}$cross_compiling" >&6; } -- --{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 --echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } --if { (ac_try="$ac_link" -+{ $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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -+$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; then -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) - # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will - # work properly (i.e., refer to `conftest.exe'), while it won't with -@@ -2237,37 +2686,90 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in -- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; -+ *.$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 -- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot compute suffix of executables: cannot compile and link --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ { { $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$ac_cv_exeext --{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 --echo "${ECHO_T}$ac_cv_exeext" >&6; } -+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 --{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 --echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } --if test "${ac_cv_objext+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ -+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 --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_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 ${ac_cv_objext+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -2279,51 +2781,46 @@ main () - } - _ACEOF - rm -f conftest.o conftest.obj --if { (ac_try="$ac_compile" -+if { { ac_try="$ac_compile" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -+$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; then -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in -- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; -+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac - done - else -- echo "$as_me: failed program was:" >&5 -+ $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot compute suffix of object files: cannot compile --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+{ { $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 --{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 --echo "${ECHO_T}$ac_cv_objext" >&6; } -+{ $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 --{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 --echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } --if test "${ac_cv_c_compiler_gnu+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 ${ac_cv_c_compiler_gnu+:} false; then : -+ $as_echo_n "(cached) " >&6 - else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -2337,54 +2834,34 @@ main () - return 0; - } - _ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -+if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_compiler_gnu=no -+ ac_compiler_gnu=no - fi -- - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_c_compiler_gnu=$ac_compiler_gnu - - fi --{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 --echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } --GCC=`test $ac_compiler_gnu = yes && echo yes` -+{ $as_echo "$as_me:${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 --{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 --echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } --if test "${ac_cv_prog_cc_g+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -+$as_echo_n "checking whether $CC accepts -g... " >&6; } -+if ${ac_cv_prog_cc_g+:} false; then : -+ $as_echo_n "(cached) " >&6 - else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -2395,34 +2872,11 @@ main () - return 0; - } - _ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -+if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- CFLAGS="" -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ CFLAGS="" -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -2433,35 +2887,12 @@ main () - return 0; - } - _ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -- : --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -+if ac_fn_c_try_compile "$LINENO"; then : - -- ac_c_werror_flag=$ac_save_c_werror_flag -+else -+ ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -2472,42 +2903,18 @@ main () - return 0; - } - _ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -+if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- - fi -- - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -- - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -- - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag - fi --{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 --echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } -+{ $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 -@@ -2523,18 +2930,14 @@ else - CFLAGS= - fi - fi --{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 --echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } --if test "${ac_cv_prog_cc_c89+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 ${ac_cv_prog_cc_c89+:} false; then : -+ $as_echo_n "(cached) " >&6 - else - ac_cv_prog_cc_c89=no - ac_save_CC=$CC --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - #include -@@ -2591,31 +2994,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" - do - CC="$ac_save_CC $ac_arg" -- rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -+ if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- - fi -- - rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break - done -@@ -2626,17 +3007,19 @@ fi - # AC_CACHE_VAL - case "x$ac_cv_prog_cc_c89" in - x) -- { echo "$as_me:$LINENO: result: none needed" >&5 --echo "${ECHO_T}none needed" >&6; } ;; -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -+$as_echo "none needed" >&6; } ;; - xno) -- { echo "$as_me:$LINENO: result: unsupported" >&5 --echo "${ECHO_T}unsupported" >&6; } ;; -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -+$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" -- { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 --echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; -+ { $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' -@@ -2661,9 +3044,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - fi - done - if test -z "$ac_aux_dir"; then -- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 --echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} -- { (exit 1); exit 1; }; } -+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 - fi - - # These three variables are undocumented and unsupported, -@@ -2688,22 +3069,23 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" - # OS/2's system install, which has a completely different semantic - # ./install, which can be erroneously created by make from ./install.sh. --{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 --echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } -+# Reject install programs that cannot install multiple files. -+{ $as_echo "$as_me:${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 -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+if ${ac_cv_path_install+:} false; 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/* | \ -+ # Account for people who put trailing slashes in PATH elements. -+case $as_dir/ in #(( -+ ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ -- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ -+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. -@@ -2721,17 +3103,29 @@ case $as_dir/ in - # program-specific install script used by HP pwplus--don't use. - : - else -- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" -- break 3 -+ rm -rf conftest.one conftest.two conftest.dir -+ echo one > conftest.one -+ echo two > conftest.two -+ mkdir conftest.dir -+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && -+ test -s conftest.one && test -s conftest.two && -+ test -s conftest.dir/conftest.one && -+ test -s conftest.dir/conftest.two -+ then -+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" -+ break 3 -+ fi - fi - fi - done - done - ;; - esac --done -+ -+ done - IFS=$as_save_IFS - -+rm -rf conftest.one conftest.two conftest.dir - - fi - if test "${ac_cv_path_install+set}" = set; then -@@ -2744,8 +3138,8 @@ fi - INSTALL=$ac_install_sh - fi - fi --{ echo "$as_me:$LINENO: result: $INSTALL" >&5 --echo "${ECHO_T}$INSTALL" >&6; } -+{ $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. -@@ -2755,18 +3149,18 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - - test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - --{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 --echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } -+{ $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 -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+ if ${ac_cv_path_mkdir+:} false; 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_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 #( -@@ -2778,11 +3172,12 @@ do - esac - done - 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 -@@ -2790,25 +3185,29 @@ fi - # 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. -- test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi - fi --{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 --echo "${ECHO_T}$MKDIR_P" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -+$as_echo "$MKDIR_P" >&6; } - - - # Checks for libraries. - - -+ -+ -+ -+ -+ - 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 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_path_PKG_CONFIG+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_path_PKG_CONFIG+:} false; then : -+ $as_echo_n "(cached) " >&6 - else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) -@@ -2820,14 +3219,14 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - ;; -@@ -2835,11 +3234,11 @@ esac - fi - PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then -- { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 --echo "${ECHO_T}$PKG_CONFIG" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -+$as_echo "$PKG_CONFIG" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - -@@ -2848,10 +3247,10 @@ 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 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : -+ $as_echo_n "(cached) " >&6 - else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) -@@ -2863,14 +3262,14 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - ;; -@@ -2878,11 +3277,11 @@ esac - fi - ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG - if test -n "$ac_pt_PKG_CONFIG"; then -- { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 --echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -+$as_echo "$ac_pt_PKG_CONFIG" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - if test "x$ac_pt_PKG_CONFIG" = x; then -@@ -2890,12 +3289,8 @@ fi - else - case $cross_compiling:$ac_tool_warned in - yes:) --{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools --whose name does not start with the host triplet. If you think this --configuration is useful to you, please write to autoconf@gnu.org." >&5 --echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools --whose name does not start with the host triplet. If you think this --configuration is useful to you, please write to autoconf@gnu.org." >&2;} -+{ $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 -@@ -2907,63 +3302,62 @@ fi - fi - if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 -- { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 --echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } -+ { $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 -- { echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - PKG_CONFIG="" - fi -- - fi - - pkg_failed=no --{ echo "$as_me:$LINENO: checking for XML" >&5 --echo $ECHO_N "checking for XML... $ECHO_C" >&6; } -- --if test -n "$PKG_CONFIG"; then -- if test -n "$XML_CFLAGS"; then -- pkg_cv_XML_CFLAGS="$XML_CFLAGS" -- else -- if test -n "$PKG_CONFIG" && \ -- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\"") >&5 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML" >&5 -+$as_echo_n "checking for XML... " >&6; } -+ -+if test -n "$XML_CFLAGS"; then -+ pkg_cv_XML_CFLAGS="$XML_CFLAGS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 - ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; then -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then - pkg_cv_XML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null` -+ test "x$?" != "x0" && pkg_failed=yes - else - pkg_failed=yes - fi -- fi --else -- pkg_failed=untried -+ else -+ pkg_failed=untried - fi --if test -n "$PKG_CONFIG"; then -- if test -n "$XML_LIBS"; then -- pkg_cv_XML_LIBS="$XML_LIBS" -- else -- if test -n "$PKG_CONFIG" && \ -- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\"") >&5 -+if test -n "$XML_LIBS"; then -+ pkg_cv_XML_LIBS="$XML_LIBS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 - ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; then -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then - pkg_cv_XML_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null` -+ test "x$?" != "x0" && pkg_failed=yes - else - pkg_failed=yes - fi -- fi --else -- pkg_failed=untried -+ else -+ pkg_failed=untried - fi - - - - if test $pkg_failed = yes; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - - if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -@@ -2971,74 +3365,70 @@ else - _pkg_short_errors_supported=no - fi - if test $_pkg_short_errors_supported = yes; then -- XML_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxml-2.0"` -+ XML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0" 2>&1` - else -- XML_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0"` -+ XML_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$XML_PKG_ERRORS" >&5 - -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -- { { echo "$as_me:$LINENO: error: 'Unable to find libxml2. Please make sure library and header files are installed.'" >&5 --echo "$as_me: error: 'Unable to find libxml2. Please make sure library and header files are installed.'" >&2;} -- { (exit 1); exit 1; }; } -+ as_fn_error $? "'Unable to find libxml2. Please make sure library and header files are installed.'" "$LINENO" 5 - elif test $pkg_failed = untried; then -- { { echo "$as_me:$LINENO: error: 'Unable to find libxml2. Please make sure library and header files are installed.'" >&5 --echo "$as_me: error: 'Unable to find libxml2. Please make sure library and header files are installed.'" >&2;} -- { (exit 1); exit 1; }; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ as_fn_error $? "'Unable to find libxml2. Please make sure library and header files are installed.'" "$LINENO" 5 - else - XML_CFLAGS=$pkg_cv_XML_CFLAGS - XML_LIBS=$pkg_cv_XML_LIBS -- { echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6; } -- : -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ - fi - - pkg_failed=no --{ echo "$as_me:$LINENO: checking for CURL" >&5 --echo $ECHO_N "checking for CURL... $ECHO_C" >&6; } -- --if test -n "$PKG_CONFIG"; then -- if test -n "$CURL_CFLAGS"; then -- pkg_cv_CURL_CFLAGS="$CURL_CFLAGS" -- else -- if test -n "$PKG_CONFIG" && \ -- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libcurl\"") >&5 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CURL" >&5 -+$as_echo_n "checking for CURL... " >&6; } -+ -+if test -n "$CURL_CFLAGS"; then -+ pkg_cv_CURL_CFLAGS="$CURL_CFLAGS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libcurl") 2>&5 - ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; then -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then - pkg_cv_CURL_CFLAGS=`$PKG_CONFIG --cflags "libcurl" 2>/dev/null` -+ test "x$?" != "x0" && pkg_failed=yes - else - pkg_failed=yes - fi -- fi --else -- pkg_failed=untried -+ else -+ pkg_failed=untried - fi --if test -n "$PKG_CONFIG"; then -- if test -n "$CURL_LIBS"; then -- pkg_cv_CURL_LIBS="$CURL_LIBS" -- else -- if test -n "$PKG_CONFIG" && \ -- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libcurl\"") >&5 -+if test -n "$CURL_LIBS"; then -+ pkg_cv_CURL_LIBS="$CURL_LIBS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libcurl") 2>&5 - ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; then -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then - pkg_cv_CURL_LIBS=`$PKG_CONFIG --libs "libcurl" 2>/dev/null` -+ test "x$?" != "x0" && pkg_failed=yes - else - pkg_failed=yes - fi -- fi --else -- pkg_failed=untried -+ else -+ pkg_failed=untried - fi - - - - if test $pkg_failed = yes; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - - if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -@@ -3046,74 +3436,141 @@ else - _pkg_short_errors_supported=no - fi - if test $_pkg_short_errors_supported = yes; then -- CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libcurl"` -+ CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcurl" 2>&1` - else -- CURL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libcurl"` -+ CURL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcurl" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$CURL_PKG_ERRORS" >&5 - -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -- { { echo "$as_me:$LINENO: error: 'Unable to find libcurl. Please make sure library and header files are installed.'" >&5 --echo "$as_me: error: 'Unable to find libcurl. Please make sure library and header files are installed.'" >&2;} -- { (exit 1); exit 1; }; } -+ as_fn_error $? "'Unable to find libcurl. Please make sure library and header files are installed.'" "$LINENO" 5 - elif test $pkg_failed = untried; then -- { { echo "$as_me:$LINENO: error: 'Unable to find libcurl. Please make sure library and header files are installed.'" >&5 --echo "$as_me: error: 'Unable to find libcurl. Please make sure library and header files are installed.'" >&2;} -- { (exit 1); exit 1; }; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ as_fn_error $? "'Unable to find libcurl. Please make sure library and header files are installed.'" "$LINENO" 5 - else - CURL_CFLAGS=$pkg_cv_CURL_CFLAGS - CURL_LIBS=$pkg_cv_CURL_LIBS -- { echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6; } -- : -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ - fi - - pkg_failed=no --{ echo "$as_me:$LINENO: checking for FUSE" >&5 --echo $ECHO_N "checking for FUSE... $ECHO_C" >&6; } -- --if test -n "$PKG_CONFIG"; then -- if test -n "$FUSE_CFLAGS"; then -- pkg_cv_FUSE_CFLAGS="$FUSE_CFLAGS" -- else -- if test -n "$PKG_CONFIG" && \ -- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"fuse\"") >&5 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUSE" >&5 -+$as_echo_n "checking for FUSE... " >&6; } -+ -+if test -n "$FUSE_CFLAGS"; then -+ pkg_cv_FUSE_CFLAGS="$FUSE_CFLAGS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fuse\""; } >&5 - ($PKG_CONFIG --exists --print-errors "fuse") 2>&5 - ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; then -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then - pkg_cv_FUSE_CFLAGS=`$PKG_CONFIG --cflags "fuse" 2>/dev/null` -+ test "x$?" != "x0" && pkg_failed=yes - else - pkg_failed=yes - fi -- fi --else -- pkg_failed=untried -+ else -+ pkg_failed=untried - fi --if test -n "$PKG_CONFIG"; then -- if test -n "$FUSE_LIBS"; then -- pkg_cv_FUSE_LIBS="$FUSE_LIBS" -- else -- if test -n "$PKG_CONFIG" && \ -- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"fuse\"") >&5 -+if test -n "$FUSE_LIBS"; then -+ pkg_cv_FUSE_LIBS="$FUSE_LIBS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fuse\""; } >&5 - ($PKG_CONFIG --exists --print-errors "fuse") 2>&5 - ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; then -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then - pkg_cv_FUSE_LIBS=`$PKG_CONFIG --libs "fuse" 2>/dev/null` -+ test "x$?" != "x0" && pkg_failed=yes - else - pkg_failed=yes - fi -- fi -+ else -+ pkg_failed=untried -+fi -+ -+ -+ -+if test $pkg_failed = yes; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ -+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 -+ FUSE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "fuse" 2>&1` -+ else -+ FUSE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "fuse" 2>&1` -+ fi -+ # Put the nasty error message in config.log where it belongs -+ echo "$FUSE_PKG_ERRORS" >&5 -+ -+ as_fn_error $? "'Unable to find libfuse. Please make sure library and header files are installed.'" "$LINENO" 5 -+elif test $pkg_failed = untried; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ as_fn_error $? "'Unable to find libfuse. Please make sure library and header files are installed.'" "$LINENO" 5 -+else -+ FUSE_CFLAGS=$pkg_cv_FUSE_CFLAGS -+ FUSE_LIBS=$pkg_cv_FUSE_LIBS -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ -+fi -+ -+pkg_failed=no -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5 -+$as_echo_n "checking for OPENSSL... " >&6; } -+ -+if test -n "$OPENSSL_CFLAGS"; then -+ pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null` -+ test "x$?" != "x0" && pkg_failed=yes -+else -+ pkg_failed=yes -+fi -+ else -+ pkg_failed=untried -+fi -+if test -n "$OPENSSL_LIBS"; then -+ pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null` -+ test "x$?" != "x0" && pkg_failed=yes - else -- pkg_failed=untried -+ pkg_failed=yes -+fi -+ else -+ pkg_failed=untried - fi - - - - if test $pkg_failed = yes; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - - if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -@@ -3121,28 +3578,44 @@ else - _pkg_short_errors_supported=no - fi - if test $_pkg_short_errors_supported = yes; then -- FUSE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "fuse"` -+ OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl" 2>&1` - else -- FUSE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fuse"` -+ OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl" 2>&1` - fi - # Put the nasty error message in config.log where it belongs -- echo "$FUSE_PKG_ERRORS" >&5 -+ echo "$OPENSSL_PKG_ERRORS" >&5 -+ -+ as_fn_error $? "Package requirements (openssl) were not met: -+ -+$OPENSSL_PKG_ERRORS - -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -- { { echo "$as_me:$LINENO: error: 'Unable to find libfuse. Please make sure library and header files are installed.'" >&5 --echo "$as_me: error: 'Unable to find libfuse. Please make sure library and header files are installed.'" >&2;} -- { (exit 1); exit 1; }; } -+Consider adjusting the PKG_CONFIG_PATH environment variable if you -+installed software in a non-standard prefix. -+ -+Alternatively, you may set the environment variables OPENSSL_CFLAGS -+and OPENSSL_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 -- { { echo "$as_me:$LINENO: error: 'Unable to find libfuse. Please make sure library and header files are installed.'" >&5 --echo "$as_me: error: 'Unable to find libfuse. Please make sure library and header files are installed.'" >&2;} -- { (exit 1); exit 1; }; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ { { $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 OPENSSL_CFLAGS -+and OPENSSL_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 -- FUSE_CFLAGS=$pkg_cv_FUSE_CFLAGS -- FUSE_LIBS=$pkg_cv_FUSE_LIBS -- { echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6; } -- : -+ OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS -+ OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ - fi - - # Checks for header files. -@@ -3152,15 +3625,15 @@ ac_cpp='$CPP $CPPFLAGS' - ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' - ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_c_compiler_gnu --{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 --echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -+$as_echo_n "checking how to run the C preprocessor... " >&6; } - # On Suns, sometimes $CPP names a directory. - if test -n "$CPP" && test -d "$CPP"; then - CPP= - fi - if test -z "$CPP"; then -- if test "${ac_cv_prog_CPP+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+ if ${ac_cv_prog_CPP+:} false; then : -+ $as_echo_n "(cached) " >&6 - else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" -@@ -3174,11 +3647,7 @@ do - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #ifdef __STDC__ - # include -@@ -3187,76 +3656,34 @@ cat >>conftest.$ac_ext <<_ACEOF - #endif - Syntax error - _ACEOF --if { (ac_try="$ac_cpp conftest.$ac_ext" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null && { -- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -- test ! -s conftest.err -- }; then -- : --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -+if ac_fn_c_try_cpp "$LINENO"; then : - -+else - # Broken: fails on valid input. - continue - fi -- --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - _ACEOF --if { (ac_try="$ac_cpp conftest.$ac_ext" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null && { -- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -- test ! -s conftest.err -- }; then -+if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. - continue - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- - # Passes both tests. - ac_preproc_ok=: - break - fi -- --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - done - # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. --rm -f conftest.err conftest.$ac_ext --if $ac_preproc_ok; then -+rm -f conftest.i conftest.err conftest.$ac_ext -+if $ac_preproc_ok; then : - break - fi - -@@ -3268,8 +3695,8 @@ fi - else - ac_cv_prog_CPP=$CPP - fi --{ echo "$as_me:$LINENO: result: $CPP" >&5 --echo "${ECHO_T}$CPP" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -+$as_echo "$CPP" >&6; } - ac_preproc_ok=false - for ac_c_preproc_warn_flag in '' yes - do -@@ -3279,11 +3706,7 @@ do - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #ifdef __STDC__ - # include -@@ -3292,83 +3715,40 @@ cat >>conftest.$ac_ext <<_ACEOF - #endif - Syntax error - _ACEOF --if { (ac_try="$ac_cpp conftest.$ac_ext" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null && { -- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -- test ! -s conftest.err -- }; then -- : --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -+if ac_fn_c_try_cpp "$LINENO"; then : - -+else - # Broken: fails on valid input. - continue - fi -- --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - _ACEOF --if { (ac_try="$ac_cpp conftest.$ac_ext" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null && { -- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -- test ! -s conftest.err -- }; then -+if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. - continue - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- - # Passes both tests. - ac_preproc_ok=: - break - fi -- --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - done - # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. --rm -f conftest.err conftest.$ac_ext --if $ac_preproc_ok; then -- : -+rm -f conftest.i conftest.err conftest.$ac_ext -+if $ac_preproc_ok; then : -+ - else -- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check --See \`config.log' for more details." >&5 --echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -+See \`config.log' for more details" "$LINENO" 5; } - fi - - ac_ext=c -@@ -3378,45 +3758,40 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ - ac_compiler_gnu=$ac_cv_c_compiler_gnu - - --{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 --echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } --if test "${ac_cv_path_GREP+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- # Extract the first word of "grep ggrep" to use in msg output --if test -z "$GREP"; then --set dummy grep ggrep; ac_prog_name=$2 --if test "${ac_cv_path_GREP+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -+$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -+if ${ac_cv_path_GREP+:} false; then : -+ $as_echo_n "(cached) " >&6 - else -+ if test -z "$GREP"; then - ac_path_GREP_found=false --# Loop through the user's path and test for each of PROGNAME-LIST --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+ # Loop through the user's path and test for each of PROGNAME-LIST -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR - for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_prog in grep ggrep; do -- for ac_exec_ext in '' $ac_executable_extensions; do -- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" -- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -- # Check for GNU ac_path_GREP and select it if it is found. -+ for ac_prog in grep ggrep; do -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" -+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -+# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP - case `"$ac_path_GREP" --version 2>&1` in - *GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; - *) - ac_count=0 -- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" -+ $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" -- echo 'GREP' >> "conftest.nl" -+ $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break -- ac_count=`expr $ac_count + 1` -+ as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" -@@ -3428,77 +3803,61 @@ case `"$ac_path_GREP" --version 2>&1` in - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; - esac - -- -- $ac_path_GREP_found && break 3 -+ $ac_path_GREP_found && break 3 -+ done -+ done - done --done -- --done - IFS=$as_save_IFS -- -- --fi -- --GREP="$ac_cv_path_GREP" --if test -z "$GREP"; then -- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 --echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} -- { (exit 1); exit 1; }; } --fi -- -+ if test -z "$ac_cv_path_GREP"; then -+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 -+ fi - else - ac_cv_path_GREP=$GREP - fi - -- - fi --{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 --echo "${ECHO_T}$ac_cv_path_GREP" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -+$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - --{ echo "$as_me:$LINENO: checking for egrep" >&5 --echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } --if test "${ac_cv_path_EGREP+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -+$as_echo_n "checking for egrep... " >&6; } -+if ${ac_cv_path_EGREP+:} false; then : -+ $as_echo_n "(cached) " >&6 - else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else -- # Extract the first word of "egrep" to use in msg output --if test -z "$EGREP"; then --set dummy egrep; ac_prog_name=$2 --if test "${ac_cv_path_EGREP+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -+ if test -z "$EGREP"; then - ac_path_EGREP_found=false --# Loop through the user's path and test for each of PROGNAME-LIST --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+ # Loop through the user's path and test for each of PROGNAME-LIST -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR - for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_prog in egrep; do -- for ac_exec_ext in '' $ac_executable_extensions; do -- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" -- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -- # Check for GNU ac_path_EGREP and select it if it is found. -+ for ac_prog in egrep; do -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" -+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -+# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP - case `"$ac_path_EGREP" --version 2>&1` in - *GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; - *) - ac_count=0 -- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" -+ $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" -- echo 'EGREP' >> "conftest.nl" -+ $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break -- ac_count=`expr $ac_count + 1` -+ as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" -@@ -3510,46 +3869,31 @@ case `"$ac_path_EGREP" --version 2>&1` in - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; - esac - -- -- $ac_path_EGREP_found && break 3 -+ $ac_path_EGREP_found && break 3 -+ done -+ done - done --done -- --done - IFS=$as_save_IFS -- -- --fi -- --EGREP="$ac_cv_path_EGREP" --if test -z "$EGREP"; then -- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 --echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} -- { (exit 1); exit 1; }; } --fi -- -+ if test -z "$ac_cv_path_EGREP"; then -+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 -+ fi - else - ac_cv_path_EGREP=$EGREP - fi - -- - fi - fi --{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 --echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -+$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - --{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 --echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } --if test "${ac_cv_header_stdc+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -+$as_echo_n "checking for ANSI C header files... " >&6; } -+if ${ac_cv_header_stdc+:} false; then : -+ $as_echo_n "(cached) " >&6 - else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - #include -@@ -3564,47 +3908,23 @@ main () - return 0; - } - _ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -+if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_cv_header_stdc=no -+ ac_cv_header_stdc=no - fi -- - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "memchr" >/dev/null 2>&1; then -- : -+ $EGREP "memchr" >/dev/null 2>&1; then : -+ - else - ac_cv_header_stdc=no - fi -@@ -3614,18 +3934,14 @@ fi - - if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "free" >/dev/null 2>&1; then -- : -+ $EGREP "free" >/dev/null 2>&1; then : -+ - else - ac_cv_header_stdc=no - fi -@@ -3635,14 +3951,10 @@ fi - - if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -- if test "$cross_compiling" = yes; then -+ if test "$cross_compiling" = yes; then : - : - else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - #include -@@ -3669,132 +3981,61 @@ main () - return 0; - } - _ACEOF --rm -f conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_try") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- : --else -- echo "$as_me: program exited with status $ac_status" >&5 --echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -+if ac_fn_c_try_run "$LINENO"; then : - --( exit $ac_status ) --ac_cv_header_stdc=no -+else -+ ac_cv_header_stdc=no - fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext - fi - -- - fi - fi --{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 --echo "${ECHO_T}$ac_cv_header_stdc" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -+$as_echo "$ac_cv_header_stdc" >&6; } - if test $ac_cv_header_stdc = yes; then - --cat >>confdefs.h <<\_ACEOF --#define STDC_HEADERS 1 --_ACEOF -+$as_echo "#define STDC_HEADERS 1" >>confdefs.h - - fi - - # On IRIX 5.3, sys/types and inttypes.h are conflicting. -+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ -+ inttypes.h stdint.h unistd.h -+do : -+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -+" -+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : -+ cat >>confdefs.h <<_ACEOF -+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF - -+fi - -+done - - -+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -+if test "x$ac_cv_type_size_t" = xyes; then : - -- -- -- -- --for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ -- inttypes.h stdint.h unistd.h --do --as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --{ echo "$as_me:$LINENO: checking for $ac_header" >&5 --echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default -- --#include <$ac_header> --_ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -- eval "$as_ac_Header=yes" - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- eval "$as_ac_Header=no" --fi - --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --fi --ac_res=`eval echo '${'$as_ac_Header'}'` -- { echo "$as_me:$LINENO: result: $ac_res" >&5 --echo "${ECHO_T}$ac_res" >&6; } --if test `eval echo '${'$as_ac_Header'}'` = yes; then -- cat >>confdefs.h <<_ACEOF --#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+cat >>confdefs.h <<_ACEOF -+#define size_t unsigned int - _ACEOF - - fi - --done -- -- - # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works - # for constant arguments. Useless! --{ echo "$as_me:$LINENO: checking for working alloca.h" >&5 --echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; } --if test "${ac_cv_working_alloca_h+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -+$as_echo_n "checking for working alloca.h... " >&6; } -+if ${ac_cv_working_alloca_h+:} false; then : -+ $as_echo_n "(cached) " >&6 - else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - int -@@ -3806,55 +4047,28 @@ char *p = (char *) alloca (2 * sizeof (int)); - return 0; - } - _ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest$ac_exeext && -- $as_test_x conftest$ac_exeext; then -+if ac_fn_c_try_link "$LINENO"; then : - ac_cv_working_alloca_h=yes - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_cv_working_alloca_h=no -+ ac_cv_working_alloca_h=no - fi -- --rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -- conftest$ac_exeext conftest.$ac_ext -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi --{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 --echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -+$as_echo "$ac_cv_working_alloca_h" >&6; } - if test $ac_cv_working_alloca_h = yes; then - --cat >>confdefs.h <<\_ACEOF --#define HAVE_ALLOCA_H 1 --_ACEOF -+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h - - fi - --{ echo "$as_me:$LINENO: checking for alloca" >&5 --echo $ECHO_N "checking for alloca... $ECHO_C" >&6; } --if test "${ac_cv_func_alloca_works+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -+$as_echo_n "checking for alloca... " >&6; } -+if ${ac_cv_func_alloca_works+:} false; then : -+ $as_echo_n "(cached) " >&6 - else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #ifdef __GNUC__ - # define alloca __builtin_alloca -@@ -3870,7 +4084,7 @@ cat >>conftest.$ac_ext <<_ACEOF - #pragma alloca - # else - # ifndef alloca /* predefined by HP cc +Olibcalls */ --char *alloca (); -+void *alloca (size_t); - # endif - # endif - # endif -@@ -3886,43 +4100,20 @@ char *p = (char *) alloca (1); - return 0; - } - _ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest$ac_exeext && -- $as_test_x conftest$ac_exeext; then -+if ac_fn_c_try_link "$LINENO"; then : - ac_cv_func_alloca_works=yes - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_cv_func_alloca_works=no -+ ac_cv_func_alloca_works=no - fi -- --rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -- conftest$ac_exeext conftest.$ac_ext -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi --{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 --echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -+$as_echo "$ac_cv_func_alloca_works" >&6; } - - if test $ac_cv_func_alloca_works = yes; then - --cat >>confdefs.h <<\_ACEOF --#define HAVE_ALLOCA 1 --_ACEOF -+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h - - else - # The SVR3 libPW and SVR4 libucb both contain incompatible functions -@@ -3932,21 +4123,15 @@ else - - ALLOCA=\${LIBOBJDIR}alloca.$ac_objext - --cat >>confdefs.h <<\_ACEOF --#define C_ALLOCA 1 --_ACEOF -+$as_echo "#define C_ALLOCA 1" >>confdefs.h - - --{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 --echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; } --if test "${ac_cv_os_cray+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 -+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -+if ${ac_cv_os_cray+:} false; then : -+ $as_echo_n "(cached) " >&6 - else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #if defined CRAY && ! defined CRAY2 - webecray -@@ -3956,7 +4141,7 @@ wenotbecray - - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "webecray" >/dev/null 2>&1; then -+ $EGREP "webecray" >/dev/null 2>&1; then : - ac_cv_os_cray=yes - else - ac_cv_os_cray=no -@@ -3964,94 +4149,13 @@ fi - rm -f conftest* - - fi --{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 --echo "${ECHO_T}$ac_cv_os_cray" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 -+$as_echo "$ac_cv_os_cray" >&6; } - if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do -- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` --{ echo "$as_me:$LINENO: checking for $ac_func" >&5 --echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } --if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --/* Define $ac_func to an innocuous variant, in case declares $ac_func. -- For example, HP-UX 11i declares gettimeofday. */ --#define $ac_func innocuous_$ac_func -- --/* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char $ac_func (); below. -- Prefer to if __STDC__ is defined, since -- exists even on freestanding compilers. */ -- --#ifdef __STDC__ --# include --#else --# include --#endif -- --#undef $ac_func -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char $ac_func (); --/* The GNU C library defines this for functions which it implements -- to always fail with ENOSYS. Some functions are actually named -- something starting with __ and the normal name is an alias. */ --#if defined __stub_$ac_func || defined __stub___$ac_func --choke me --#endif -- --int --main () --{ --return $ac_func (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest$ac_exeext && -- $as_test_x conftest$ac_exeext; then -- eval "$as_ac_var=yes" --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- eval "$as_ac_var=no" --fi -- --rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -- conftest$ac_exeext conftest.$ac_ext --fi --ac_res=`eval echo '${'$as_ac_var'}'` -- { echo "$as_me:$LINENO: result: $ac_res" >&5 --echo "${ECHO_T}$ac_res" >&6; } --if test `eval echo '${'$as_ac_var'}'` = yes; then -+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -+if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - - cat >>confdefs.h <<_ACEOF - #define CRAY_STACKSEG_END $ac_func -@@ -4063,19 +4167,15 @@ fi - done - fi - --{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 --echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; } --if test "${ac_cv_c_stack_direction+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -+$as_echo_n "checking stack direction for C alloca... " >&6; } -+if ${ac_cv_c_stack_direction+:} false; then : -+ $as_echo_n "(cached) " >&6 - else -- if test "$cross_compiling" = yes; then -+ if test "$cross_compiling" = yes; then : - ac_cv_c_stack_direction=0 - else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - $ac_includes_default - int -@@ -4098,43 +4198,18 @@ main () - return find_stack_direction () < 0; - } - _ACEOF --rm -f conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_try") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -+if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_stack_direction=1 --else -- echo "$as_me: program exited with status $ac_status" >&5 --echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --( exit $ac_status ) --ac_cv_c_stack_direction=-1 -+else -+ ac_cv_c_stack_direction=-1 - fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext - fi - -- - fi --{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 --echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; } -- -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -+$as_echo "$ac_cv_c_stack_direction" >&6; } - cat >>confdefs.h <<_ACEOF - #define STACK_DIRECTION $ac_cv_c_stack_direction - _ACEOF -@@ -4142,16 +4217,12 @@ _ACEOF - - fi - --{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 --echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } --if test "${ac_cv_header_stdc+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -+$as_echo_n "checking for ANSI C header files... " >&6; } -+if ${ac_cv_header_stdc+:} false; then : -+ $as_echo_n "(cached) " >&6 - else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - #include -@@ -4166,47 +4237,23 @@ main () - return 0; - } - _ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -+if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_cv_header_stdc=no -+ ac_cv_header_stdc=no - fi -- - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "memchr" >/dev/null 2>&1; then -- : -+ $EGREP "memchr" >/dev/null 2>&1; then : -+ - else - ac_cv_header_stdc=no - fi -@@ -4216,18 +4263,14 @@ fi - - if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "free" >/dev/null 2>&1; then -- : -+ $EGREP "free" >/dev/null 2>&1; then : -+ - else - ac_cv_header_stdc=no - fi -@@ -4237,14 +4280,10 @@ fi - - if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -- if test "$cross_compiling" = yes; then -+ if test "$cross_compiling" = yes; then : - : - else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - #include -@@ -4271,358 +4310,54 @@ main () - return 0; - } - _ACEOF --rm -f conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_try") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- : --else -- echo "$as_me: program exited with status $ac_status" >&5 --echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -+if ac_fn_c_try_run "$LINENO"; then : - --( exit $ac_status ) --ac_cv_header_stdc=no -+else -+ ac_cv_header_stdc=no - fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext - fi - -- - fi - fi --{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 --echo "${ECHO_T}$ac_cv_header_stdc" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -+$as_echo "$ac_cv_header_stdc" >&6; } - if test $ac_cv_header_stdc = yes; then - --cat >>confdefs.h <<\_ACEOF --#define STDC_HEADERS 1 --_ACEOF -+$as_echo "#define STDC_HEADERS 1" >>confdefs.h - - fi - -- -- -- -- -- -- -- -- -- -- -- -- - for ac_header in fcntl.h stdint.h stddef.h stdlib.h string.h strings.h sys/time.h unistd.h pthread.h fuse.h curl/curl.h libxml/tree.h --do --as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -- { echo "$as_me:$LINENO: checking for $ac_header" >&5 --echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --fi --ac_res=`eval echo '${'$as_ac_Header'}'` -- { echo "$as_me:$LINENO: result: $ac_res" >&5 --echo "${ECHO_T}$ac_res" >&6; } --else -- # Is the header compilable? --{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 --echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --#include <$ac_header> --_ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -- ac_header_compiler=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_header_compiler=no --fi -- --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 --echo "${ECHO_T}$ac_header_compiler" >&6; } -- --# Is the header present? --{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 --echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include <$ac_header> --_ACEOF --if { (ac_try="$ac_cpp conftest.$ac_ext" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null && { -- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -- test ! -s conftest.err -- }; then -- ac_header_preproc=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_header_preproc=no --fi -- --rm -f conftest.err conftest.$ac_ext --{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 --echo "${ECHO_T}$ac_header_preproc" >&6; } -- --# So? What about this header? --case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -- yes:no: ) -- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 --echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 --echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} -- ac_header_preproc=yes -- ;; -- no:yes:* ) -- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 --echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 --echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 --echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 --echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} -- ( cat <<\_ASBOX --## ---------------------------------------------------- ## --## Report this to Michael Barton ## --## ---------------------------------------------------- ## --_ASBOX -- ) | sed "s/^/$as_me: WARNING: /" >&2 -- ;; --esac --{ echo "$as_me:$LINENO: checking for $ac_header" >&5 --echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- eval "$as_ac_Header=\$ac_header_preproc" --fi --ac_res=`eval echo '${'$as_ac_Header'}'` -- { echo "$as_me:$LINENO: result: $ac_res" >&5 --echo "${ECHO_T}$ac_res" >&6; } -- --fi --if test `eval echo '${'$as_ac_Header'}'` = yes; then -+do : -+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF --#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 - _ACEOF - - fi - - done - --if test "${ac_cv_header_openssl_crypto_h+set}" = set; then -- { echo "$as_me:$LINENO: checking for openssl/crypto.h" >&5 --echo $ECHO_N "checking for openssl/crypto.h... $ECHO_C" >&6; } --if test "${ac_cv_header_openssl_crypto_h+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --fi --{ echo "$as_me:$LINENO: result: $ac_cv_header_openssl_crypto_h" >&5 --echo "${ECHO_T}$ac_cv_header_openssl_crypto_h" >&6; } --else -- # Is the header compilable? --{ echo "$as_me:$LINENO: checking openssl/crypto.h usability" >&5 --echo $ECHO_N "checking openssl/crypto.h usability... $ECHO_C" >&6; } --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --#include --_ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -- ac_header_compiler=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_header_compiler=no --fi -- --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 --echo "${ECHO_T}$ac_header_compiler" >&6; } -- --# Is the header present? --{ echo "$as_me:$LINENO: checking openssl/crypto.h presence" >&5 --echo $ECHO_N "checking openssl/crypto.h presence... $ECHO_C" >&6; } --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include --_ACEOF --if { (ac_try="$ac_cpp conftest.$ac_ext" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null && { -- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -- test ! -s conftest.err -- }; then -- ac_header_preproc=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_header_preproc=no --fi -- --rm -f conftest.err conftest.$ac_ext --{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 --echo "${ECHO_T}$ac_header_preproc" >&6; } -- --# So? What about this header? --case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -- yes:no: ) -- { echo "$as_me:$LINENO: WARNING: openssl/crypto.h: accepted by the compiler, rejected by the preprocessor!" >&5 --echo "$as_me: WARNING: openssl/crypto.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: openssl/crypto.h: proceeding with the compiler's result" >&5 --echo "$as_me: WARNING: openssl/crypto.h: proceeding with the compiler's result" >&2;} -- ac_header_preproc=yes -- ;; -- no:yes:* ) -- { echo "$as_me:$LINENO: WARNING: openssl/crypto.h: present but cannot be compiled" >&5 --echo "$as_me: WARNING: openssl/crypto.h: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: openssl/crypto.h: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: openssl/crypto.h: check for missing prerequisite headers?" >&2;} -- { echo "$as_me:$LINENO: WARNING: openssl/crypto.h: see the Autoconf documentation" >&5 --echo "$as_me: WARNING: openssl/crypto.h: see the Autoconf documentation" >&2;} -- { echo "$as_me:$LINENO: WARNING: openssl/crypto.h: section \"Present But Cannot Be Compiled\"" >&5 --echo "$as_me: WARNING: openssl/crypto.h: section \"Present But Cannot Be Compiled\"" >&2;} -- { echo "$as_me:$LINENO: WARNING: openssl/crypto.h: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: openssl/crypto.h: proceeding with the preprocessor's result" >&2;} -- { echo "$as_me:$LINENO: WARNING: openssl/crypto.h: in the future, the compiler will take precedence" >&5 --echo "$as_me: WARNING: openssl/crypto.h: in the future, the compiler will take precedence" >&2;} -- ( cat <<\_ASBOX --## ---------------------------------------------------- ## --## Report this to Michael Barton ## --## ---------------------------------------------------- ## --_ASBOX -- ) | sed "s/^/$as_me: WARNING: /" >&2 -- ;; --esac --{ echo "$as_me:$LINENO: checking for openssl/crypto.h" >&5 --echo $ECHO_N "checking for openssl/crypto.h... $ECHO_C" >&6; } --if test "${ac_cv_header_openssl_crypto_h+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_cv_header_openssl_crypto_h=$ac_header_preproc --fi --{ echo "$as_me:$LINENO: result: $ac_cv_header_openssl_crypto_h" >&5 --echo "${ECHO_T}$ac_cv_header_openssl_crypto_h" >&6; } -- --fi --if test $ac_cv_header_openssl_crypto_h = yes; then -+ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default" -+if test "x$ac_cv_header_openssl_crypto_h" = xyes; then : - --cat >>confdefs.h <<\_ACEOF --#define HAVE_OPENSSL --_ACEOF -+$as_echo "#define HAVE_OPENSSL /**/" >>confdefs.h - - fi - - - - # Checks for typedefs, structures, and compiler characteristics. --{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 --echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } --if test "${ac_cv_c_const+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -+$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -+if ${ac_cv_c_const+:} false; then : -+ $as_echo_n "(cached) " >&6 - else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -4682,59 +4417,33 @@ main () - return 0; - } - _ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -+if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_cv_c_const=no -+ ac_cv_c_const=no - fi -- - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi --{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 --echo "${ECHO_T}$ac_cv_c_const" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -+$as_echo "$ac_cv_c_const" >&6; } - if test $ac_cv_c_const = no; then - --cat >>confdefs.h <<\_ACEOF --#define const --_ACEOF -+$as_echo "#define const /**/" >>confdefs.h - - fi - --{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 --echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } --if test "${ac_cv_type_uid_t+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 -+$as_echo_n "checking for uid_t in sys/types.h... " >&6; } -+if ${ac_cv_type_uid_t+:} false; then : -+ $as_echo_n "(cached) " >&6 - else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "uid_t" >/dev/null 2>&1; then -+ $EGREP "uid_t" >/dev/null 2>&1; then : - ac_cv_type_uid_t=yes - else - ac_cv_type_uid_t=no -@@ -4742,76 +4451,20 @@ fi - rm -f conftest* - - fi --{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 --echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 -+$as_echo "$ac_cv_type_uid_t" >&6; } - if test $ac_cv_type_uid_t = no; then - --cat >>confdefs.h <<\_ACEOF --#define uid_t int --_ACEOF -+$as_echo "#define uid_t int" >>confdefs.h - - --cat >>confdefs.h <<\_ACEOF --#define gid_t int --_ACEOF -+$as_echo "#define gid_t int" >>confdefs.h - - fi - --{ echo "$as_me:$LINENO: checking for mode_t" >&5 --echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } --if test "${ac_cv_type_mode_t+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --typedef mode_t ac__type_new_; --int --main () --{ --if ((ac__type_new_ *) 0) -- return 0; --if (sizeof (ac__type_new_)) -- return 0; -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -- ac_cv_type_mode_t=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_cv_type_mode_t=no --fi -+ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" -+if test "x$ac_cv_type_mode_t" = xyes; then : - --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --fi --{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 --echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } --if test $ac_cv_type_mode_t = yes; then -- : - else - - cat >>confdefs.h <<_ACEOF -@@ -4820,61 +4473,9 @@ _ACEOF - - fi - --{ echo "$as_me:$LINENO: checking for off_t" >&5 --echo $ECHO_N "checking for off_t... $ECHO_C" >&6; } --if test "${ac_cv_type_off_t+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --typedef off_t ac__type_new_; --int --main () --{ --if ((ac__type_new_ *) 0) -- return 0; --if (sizeof (ac__type_new_)) -- return 0; -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -- ac_cv_type_off_t=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_cv_type_off_t=no --fi -+ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -+if test "x$ac_cv_type_off_t" = xyes; then : - --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --fi --{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 --echo "${ECHO_T}$ac_cv_type_off_t" >&6; } --if test $ac_cv_type_off_t = yes; then -- : - else - - cat >>confdefs.h <<_ACEOF -@@ -4883,61 +4484,9 @@ _ACEOF - - fi - --{ echo "$as_me:$LINENO: checking for size_t" >&5 --echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } --if test "${ac_cv_type_size_t+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --typedef size_t ac__type_new_; --int --main () --{ --if ((ac__type_new_ *) 0) -- return 0; --if (sizeof (ac__type_new_)) -- return 0; -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -- ac_cv_type_size_t=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_cv_type_size_t=no --fi -- --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --fi --{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 --echo "${ECHO_T}$ac_cv_type_size_t" >&6; } --if test $ac_cv_type_size_t = yes; then -- : -+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -+if test "x$ac_cv_type_size_t" = xyes; then : -+ - else - - cat >>confdefs.h <<_ACEOF -@@ -4946,16 +4495,12 @@ _ACEOF - - fi - --{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 --echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } --if test "${ac_cv_struct_tm+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 -+$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -+if ${ac_cv_struct_tm+:} false; then : -+ $as_echo_n "(cached) " >&6 - else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - #include -@@ -4965,151 +4510,35 @@ main () - { - struct tm tm; - int *p = &tm.tm_sec; -- return !p; -+ return !p; - ; - return 0; - } - _ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -+if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_struct_tm=time.h - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_cv_struct_tm=sys/time.h -+ ac_cv_struct_tm=sys/time.h - fi -- - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi --{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 --echo "${ECHO_T}$ac_cv_struct_tm" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 -+$as_echo "$ac_cv_struct_tm" >&6; } - if test $ac_cv_struct_tm = sys/time.h; then - --cat >>confdefs.h <<\_ACEOF --#define TM_IN_SYS_TIME 1 --_ACEOF -- --fi -- --{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 --echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; } --if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --int --main () --{ --static struct stat ac_aggr; --if (ac_aggr.st_blocks) --return 0; -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -- ac_cv_member_struct_stat_st_blocks=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --int --main () --{ --static struct stat ac_aggr; --if (sizeof ac_aggr.st_blocks) --return 0; -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -- ac_cv_member_struct_stat_st_blocks=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_cv_member_struct_stat_st_blocks=no --fi -+$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h - --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --fi --{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 --echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; } --if test $ac_cv_member_struct_stat_st_blocks = yes; then -+ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" -+if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : - - cat >>confdefs.h <<_ACEOF - #define HAVE_STRUCT_STAT_ST_BLOCKS 1 - _ACEOF - - --cat >>confdefs.h <<\_ACEOF --#define HAVE_ST_BLOCKS 1 --_ACEOF -+$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h - - else - case " $LIBOBJS " in -@@ -5123,164 +4552,27 @@ fi - - - # Checks for library functions. -- - for ac_header in stdlib.h --do --as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -- { echo "$as_me:$LINENO: checking for $ac_header" >&5 --echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --fi --ac_res=`eval echo '${'$as_ac_Header'}'` -- { echo "$as_me:$LINENO: result: $ac_res" >&5 --echo "${ECHO_T}$ac_res" >&6; } --else -- # Is the header compilable? --{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 --echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --#include <$ac_header> --_ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -- ac_header_compiler=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_header_compiler=no --fi -- --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 --echo "${ECHO_T}$ac_header_compiler" >&6; } -- --# Is the header present? --{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 --echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include <$ac_header> --_ACEOF --if { (ac_try="$ac_cpp conftest.$ac_ext" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null && { -- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -- test ! -s conftest.err -- }; then -- ac_header_preproc=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_header_preproc=no --fi -- --rm -f conftest.err conftest.$ac_ext --{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 --echo "${ECHO_T}$ac_header_preproc" >&6; } -- --# So? What about this header? --case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -- yes:no: ) -- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 --echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 --echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} -- ac_header_preproc=yes -- ;; -- no:yes:* ) -- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 --echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 --echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 --echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 --echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} -- ( cat <<\_ASBOX --## ---------------------------------------------------- ## --## Report this to Michael Barton ## --## ---------------------------------------------------- ## --_ASBOX -- ) | sed "s/^/$as_me: WARNING: /" >&2 -- ;; --esac --{ echo "$as_me:$LINENO: checking for $ac_header" >&5 --echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- eval "$as_ac_Header=\$ac_header_preproc" --fi --ac_res=`eval echo '${'$as_ac_Header'}'` -- { echo "$as_me:$LINENO: result: $ac_res" >&5 --echo "${ECHO_T}$ac_res" >&6; } -- --fi --if test `eval echo '${'$as_ac_Header'}'` = yes; then -+do : -+ ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -+if test "x$ac_cv_header_stdlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF --#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+#define HAVE_STDLIB_H 1 - _ACEOF - - fi - - done - --{ echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 --echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6; } --if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 -+$as_echo_n "checking for GNU libc compatible malloc... " >&6; } -+if ${ac_cv_func_malloc_0_nonnull+:} false; then : -+ $as_echo_n "(cached) " >&6 - else -- if test "$cross_compiling" = yes; then -+ if test "$cross_compiling" = yes; then : - ac_cv_func_malloc_0_nonnull=no - else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #if defined STDC_HEADERS || defined HAVE_STDLIB_H - # include -@@ -5296,380 +4588,88 @@ return ! malloc (0); - return 0; - } - _ACEOF --rm -f conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_try") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -+if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_malloc_0_nonnull=yes - else -- echo "$as_me: program exited with status $ac_status" >&5 --echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --( exit $ac_status ) --ac_cv_func_malloc_0_nonnull=no --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext --fi -- -- --fi --{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 --echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6; } --if test $ac_cv_func_malloc_0_nonnull = yes; then -- --cat >>confdefs.h <<\_ACEOF --#define HAVE_MALLOC 1 --_ACEOF -- --else -- cat >>confdefs.h <<\_ACEOF --#define HAVE_MALLOC 0 --_ACEOF -- -- case " $LIBOBJS " in -- *" malloc.$ac_objext "* ) ;; -- *) LIBOBJS="$LIBOBJS malloc.$ac_objext" -- ;; --esac -- -- --cat >>confdefs.h <<\_ACEOF --#define malloc rpl_malloc --_ACEOF -- --fi -- -- -- --{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 --echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } --if test "${ac_cv_header_time+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include --#include --#include -- --int --main () --{ --if ((struct tm *) 0) --return 0; -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -- ac_cv_header_time=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_cv_header_time=no --fi -- --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --fi --{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 --echo "${ECHO_T}$ac_cv_header_time" >&6; } --if test $ac_cv_header_time = yes; then -- --cat >>confdefs.h <<\_ACEOF --#define TIME_WITH_SYS_TIME 1 --_ACEOF -- --fi -- -- -- -- -- --for ac_header in $ac_header_list --do --as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -- { echo "$as_me:$LINENO: checking for $ac_header" >&5 --echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --fi --ac_res=`eval echo '${'$as_ac_Header'}'` -- { echo "$as_me:$LINENO: result: $ac_res" >&5 --echo "${ECHO_T}$ac_res" >&6; } --else -- # Is the header compilable? --{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 --echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --#include <$ac_header> --_ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -- ac_header_compiler=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_header_compiler=no --fi -- --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 --echo "${ECHO_T}$ac_header_compiler" >&6; } -- --# Is the header present? --{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 --echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include <$ac_header> --_ACEOF --if { (ac_try="$ac_cpp conftest.$ac_ext" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null && { -- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -- test ! -s conftest.err -- }; then -- ac_header_preproc=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_header_preproc=no --fi -- --rm -f conftest.err conftest.$ac_ext --{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 --echo "${ECHO_T}$ac_header_preproc" >&6; } -- --# So? What about this header? --case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -- yes:no: ) -- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 --echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 --echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} -- ac_header_preproc=yes -- ;; -- no:yes:* ) -- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 --echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 --echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 --echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 --echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} -- ( cat <<\_ASBOX --## ---------------------------------------------------- ## --## Report this to Michael Barton ## --## ---------------------------------------------------- ## --_ASBOX -- ) | sed "s/^/$as_me: WARNING: /" >&2 -- ;; --esac --{ echo "$as_me:$LINENO: checking for $ac_header" >&5 --echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- eval "$as_ac_Header=\$ac_header_preproc" -+ ac_cv_func_malloc_0_nonnull=no - fi --ac_res=`eval echo '${'$as_ac_Header'}'` -- { echo "$as_me:$LINENO: result: $ac_res" >&5 --echo "${ECHO_T}$ac_res" >&6; } -- -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext - fi --if test `eval echo '${'$as_ac_Header'}'` = yes; then -- cat >>confdefs.h <<_ACEOF --#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 --_ACEOF - - fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 -+$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } -+if test $ac_cv_func_malloc_0_nonnull = yes; then : - --done -- -- -+$as_echo "#define HAVE_MALLOC 1" >>confdefs.h - -+else -+ $as_echo "#define HAVE_MALLOC 0" >>confdefs.h - -+ case " $LIBOBJS " in -+ *" malloc.$ac_objext "* ) ;; -+ *) LIBOBJS="$LIBOBJS malloc.$ac_objext" -+ ;; -+esac - - -+$as_echo "#define malloc rpl_malloc" >>confdefs.h - -+fi - - --for ac_func in $ac_func_list --do --as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` --{ echo "$as_me:$LINENO: checking for $ac_func" >&5 --echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } --if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -+$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -+if ${ac_cv_header_time+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --/* Define $ac_func to an innocuous variant, in case declares $ac_func. -- For example, HP-UX 11i declares gettimeofday. */ --#define $ac_func innocuous_$ac_func -- --/* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char $ac_func (); below. -- Prefer to if __STDC__ is defined, since -- exists even on freestanding compilers. */ -- --#ifdef __STDC__ --# include --#else --# include --#endif -- --#undef $ac_func -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char $ac_func (); --/* The GNU C library defines this for functions which it implements -- to always fail with ENOSYS. Some functions are actually named -- something starting with __ and the normal name is an alias. */ --#if defined __stub_$ac_func || defined __stub___$ac_func --choke me --#endif -+#include -+#include -+#include - - int - main () - { --return $ac_func (); -+if ((struct tm *) 0) -+return 0; - ; - return 0; - } - _ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest$ac_exeext && -- $as_test_x conftest$ac_exeext; then -- eval "$as_ac_var=yes" -+if ac_fn_c_try_compile "$LINENO"; then : -+ ac_cv_header_time=yes - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- eval "$as_ac_var=no" -+ ac_cv_header_time=no -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -+$as_echo "$ac_cv_header_time" >&6; } -+if test $ac_cv_header_time = yes; then -+ -+$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - --rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -- conftest$ac_exeext conftest.$ac_ext - fi --ac_res=`eval echo '${'$as_ac_var'}'` -- { echo "$as_me:$LINENO: result: $ac_res" >&5 --echo "${ECHO_T}$ac_res" >&6; } --if test `eval echo '${'$as_ac_var'}'` = yes; then -+ -+ -+ -+ -+ for ac_header in $ac_header_list -+do : -+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -+" -+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF --#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 - _ACEOF - - fi --done -- -- - -+done - - - -@@ -5678,25 +4678,31 @@ done - - - -+ for ac_func in $ac_func_list -+do : -+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -+if eval test \"x\$"$as_ac_var"\" = x"yes"; then : -+ cat >>confdefs.h <<_ACEOF -+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -+_ACEOF - -+fi -+done - - - - - --{ echo "$as_me:$LINENO: checking for working mktime" >&5 --echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; } --if test "${ac_cv_func_working_mktime+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 -+$as_echo_n "checking for working mktime... " >&6; } -+if ${ac_cv_func_working_mktime+:} false; then : -+ $as_echo_n "(cached) " >&6 - else -- if test "$cross_compiling" = yes; then -+ if test "$cross_compiling" = yes; then : - ac_cv_func_working_mktime=no - else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - /* Test program from Paul Eggert and Tony Leneis. */ - #ifdef TIME_WITH_SYS_TIME -@@ -5728,8 +4734,8 @@ static time_t time_t_max; - static time_t time_t_min; - - /* Values we'll use to set the TZ environment variable. */ --static char *tz_strings[] = { -- (char *) 0, "TZ=GMT0", "TZ=JST-9", -+static const char *tz_strings[] = { -+ (const char *) 0, "TZ=GMT0", "TZ=JST-9", - "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" - }; - #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) -@@ -5746,7 +4752,7 @@ spring_forward_gap () - instead of "TZ=America/Vancouver" in order to detect the bug even - on systems that don't support the Olson extension, or don't have the - full zoneinfo tables installed. */ -- putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); -+ putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); - - tm.tm_year = 98; - tm.tm_mon = 3; -@@ -5759,16 +4765,14 @@ spring_forward_gap () - } - - static int --mktime_test1 (now) -- time_t now; -+mktime_test1 (time_t now) - { - struct tm *lt; - return ! (lt = localtime (&now)) || mktime (lt) == now; - } - - static int --mktime_test (now) -- time_t now; -+mktime_test (time_t now) - { - return (mktime_test1 (now) - && mktime_test1 ((time_t) (time_t_max - now)) -@@ -5792,8 +4796,7 @@ irix_6_4_bug () - } - - static int --bigtime_test (j) -- int j; -+bigtime_test (int j) - { - struct tm tm; - time_t now; -@@ -5837,7 +4840,7 @@ year_2050_test () - instead of "TZ=America/Vancouver" in order to detect the bug even - on systems that don't support the Olson extension, or don't have the - full zoneinfo tables installed. */ -- putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); -+ putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); - - t = mktime (&tm); - -@@ -5872,7 +4875,7 @@ main () - for (i = 0; i < N_STRINGS; i++) - { - if (tz_strings[i]) -- putenv (tz_strings[i]); -+ putenv ((char*) tz_strings[i]); - - for (t = 0; t <= time_t_max - delta; t += delta) - if (! mktime_test (t)) -@@ -5893,42 +4896,18 @@ main () - return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); - } - _ACEOF --rm -f conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_try") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -+if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_working_mktime=yes - else -- echo "$as_me: program exited with status $ac_status" >&5 --echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --( exit $ac_status ) --ac_cv_func_working_mktime=no -+ ac_cv_func_working_mktime=no - fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext - fi - -- - fi --{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5 --echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 -+$as_echo "$ac_cv_func_working_mktime" >&6; } - if test $ac_cv_func_working_mktime = no; then - case " $LIBOBJS " in - *" mktime.$ac_objext "* ) ;; -@@ -5938,16 +4917,12 @@ esac - - fi - --{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 --echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } --if test "${ac_cv_type_signal+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 -+$as_echo_n "checking return type of signal handlers... " >&6; } -+if ${ac_cv_type_signal+:} false; then : -+ $as_echo_n "(cached) " >&6 - else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - #include -@@ -5960,218 +4935,33 @@ return *(signal (0, 0)) (0) == 1; - return 0; - } - _ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -+if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_signal=int - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_cv_type_signal=void -+ ac_cv_type_signal=void - fi -- - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi --{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 --echo "${ECHO_T}$ac_cv_type_signal" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 -+$as_echo "$ac_cv_type_signal" >&6; } - - cat >>confdefs.h <<_ACEOF - #define RETSIGTYPE $ac_cv_type_signal - _ACEOF - - -- - for ac_func in vprintf --do --as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` --{ echo "$as_me:$LINENO: checking for $ac_func" >&5 --echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } --if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --/* Define $ac_func to an innocuous variant, in case declares $ac_func. -- For example, HP-UX 11i declares gettimeofday. */ --#define $ac_func innocuous_$ac_func -- --/* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char $ac_func (); below. -- Prefer to if __STDC__ is defined, since -- exists even on freestanding compilers. */ -- --#ifdef __STDC__ --# include --#else --# include --#endif -- --#undef $ac_func -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char $ac_func (); --/* The GNU C library defines this for functions which it implements -- to always fail with ENOSYS. Some functions are actually named -- something starting with __ and the normal name is an alias. */ --#if defined __stub_$ac_func || defined __stub___$ac_func --choke me --#endif -- --int --main () --{ --return $ac_func (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest$ac_exeext && -- $as_test_x conftest$ac_exeext; then -- eval "$as_ac_var=yes" --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- eval "$as_ac_var=no" --fi -- --rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -- conftest$ac_exeext conftest.$ac_ext --fi --ac_res=`eval echo '${'$as_ac_var'}'` -- { echo "$as_me:$LINENO: result: $ac_res" >&5 --echo "${ECHO_T}$ac_res" >&6; } --if test `eval echo '${'$as_ac_var'}'` = yes; then -+do : -+ ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" -+if test "x$ac_cv_func_vprintf" = xyes; then : - cat >>confdefs.h <<_ACEOF --#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 --_ACEOF -- --{ echo "$as_me:$LINENO: checking for _doprnt" >&5 --echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; } --if test "${ac_cv_func__doprnt+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --/* Define _doprnt to an innocuous variant, in case declares _doprnt. -- For example, HP-UX 11i declares gettimeofday. */ --#define _doprnt innocuous__doprnt -- --/* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char _doprnt (); below. -- Prefer to if __STDC__ is defined, since -- exists even on freestanding compilers. */ -- --#ifdef __STDC__ --# include --#else --# include --#endif -- --#undef _doprnt -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char _doprnt (); --/* The GNU C library defines this for functions which it implements -- to always fail with ENOSYS. Some functions are actually named -- something starting with __ and the normal name is an alias. */ --#if defined __stub__doprnt || defined __stub____doprnt --choke me --#endif -- --int --main () --{ --return _doprnt (); -- ; -- return 0; --} -+#define HAVE_VPRINTF 1 - _ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest$ac_exeext && -- $as_test_x conftest$ac_exeext; then -- ac_cv_func__doprnt=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 - -- ac_cv_func__doprnt=no --fi -- --rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -- conftest$ac_exeext conftest.$ac_ext --fi --{ echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 --echo "${ECHO_T}$ac_cv_func__doprnt" >&6; } --if test $ac_cv_func__doprnt = yes; then -+ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" -+if test "x$ac_cv_func__doprnt" = xyes; then : - --cat >>confdefs.h <<\_ACEOF --#define HAVE_DOPRNT 1 --_ACEOF -+$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h - - fi - -@@ -6179,102 +4969,13 @@ fi - done - - -- -- -- -- -- -- -- -- - for ac_func in ftruncate memmove strcasecmp strchr strdup strncasecmp strrchr strstr --do --as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` --{ echo "$as_me:$LINENO: checking for $ac_func" >&5 --echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } --if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --/* Define $ac_func to an innocuous variant, in case declares $ac_func. -- For example, HP-UX 11i declares gettimeofday. */ --#define $ac_func innocuous_$ac_func -- --/* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char $ac_func (); below. -- Prefer to if __STDC__ is defined, since -- exists even on freestanding compilers. */ -- --#ifdef __STDC__ --# include --#else --# include --#endif -- --#undef $ac_func -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char $ac_func (); --/* The GNU C library defines this for functions which it implements -- to always fail with ENOSYS. Some functions are actually named -- something starting with __ and the normal name is an alias. */ --#if defined __stub_$ac_func || defined __stub___$ac_func --choke me --#endif -- --int --main () --{ --return $ac_func (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest$ac_exeext && -- $as_test_x conftest$ac_exeext; then -- eval "$as_ac_var=yes" --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- eval "$as_ac_var=no" --fi -- --rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -- conftest$ac_exeext conftest.$ac_ext --fi --ac_res=`eval echo '${'$as_ac_var'}'` -- { echo "$as_me:$LINENO: result: $ac_res" >&5 --echo "${ECHO_T}$ac_res" >&6; } --if test `eval echo '${'$as_ac_var'}'` = yes; then -+do : -+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -+if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF --#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF - - fi -@@ -6308,12 +5009,13 @@ _ACEOF - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( -- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 --echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; -+ *_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) ;; #( -- *) $as_unset $ac_var ;; -+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( -+ *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done -@@ -6321,8 +5023,8 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) -- # `set' does not quote correctly, so add quotes (double-quote -- # substitution turns \\\\ into \\, and sed turns \\ into \). -+ # `set' does not quote correctly, so add quotes: double-quote -+ # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" -@@ -6344,13 +5046,24 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - :end' >>confcache - if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then -- test "x$cache_file" != "x/dev/null" && -- { echo "$as_me:$LINENO: updating cache $cache_file" >&5 --echo "$as_me: updating cache $cache_file" >&6;} -- cat confcache >$cache_file -+ if test "x$cache_file" != "x/dev/null"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -+$as_echo "$as_me: updating cache $cache_file" >&6;} -+ if test ! -f "$cache_file" || test -h "$cache_file"; then -+ cat confcache >"$cache_file" -+ else -+ case $cache_file in #( -+ */* | ?:*) -+ mv -f confcache "$cache_file"$$ && -+ mv -f "$cache_file"$$ "$cache_file" ;; #( -+ *) -+ mv -f confcache "$cache_file" ;; -+ esac -+ fi -+ fi - else -- { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 --echo "$as_me: not updating unwritable cache $cache_file" >&6;} -+ { $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 -@@ -6363,14 +5076,15 @@ DEFS=-DHAVE_CONFIG_H - - ac_libobjs= - ac_ltlibobjs= -+U= - for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' -- ac_i=`echo "$ac_i" | sed "$ac_script"` -+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. -- ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" -- ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" -+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' - done - LIBOBJS=$ac_libobjs - -@@ -6378,12 +5092,14 @@ LTLIBOBJS=$ac_ltlibobjs - - - --: ${CONFIG_STATUS=./config.status} -+: "${CONFIG_STATUS=./config.status}" -+ac_write_fail=0 - ac_clean_files_save=$ac_clean_files - ac_clean_files="$ac_clean_files $CONFIG_STATUS" --{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 --echo "$as_me: creating $CONFIG_STATUS" >&6;} --cat >$CONFIG_STATUS <<_ACEOF -+{ $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. -@@ -6393,59 +5109,79 @@ cat >$CONFIG_STATUS <<_ACEOF - debug=false - ac_cs_recheck=false - ac_cs_silent=false --SHELL=\${CONFIG_SHELL-$SHELL} --_ACEOF - --cat >>$CONFIG_STATUS <<\_ACEOF --## --------------------- ## --## M4sh Initialization. ## --## --------------------- ## -+SHELL=\${CONFIG_SHELL-$SHELL} -+export SHELL -+_ASEOF -+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -+## -------------------- ## -+## M4sh Initialization. ## -+## -------------------- ## - - # Be more Bourne compatible - DUALCASE=1; export DUALCASE # for MKS sh --if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: -- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which -+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST - else -- case `(set -o) 2>/dev/null` in -- *posix*) set -o posix ;; -+ case `(set -o) 2>/dev/null` in #( -+ *posix*) : -+ set -o posix ;; #( -+ *) : -+ ;; - esac -- - fi - - -- -- --# PATH needs CR --# Avoid depending upon Character Ranges. --as_cr_letters='abcdefghijklmnopqrstuvwxyz' --as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' --as_cr_Letters=$as_cr_letters$as_cr_LETTERS --as_cr_digits='0123456789' --as_cr_alnum=$as_cr_Letters$as_cr_digits -- --# The user is always right. --if test "${PATH_SEPARATOR+set}" != set; then -- echo "#! /bin/sh" >conf$$.sh -- echo "exit 0" >>conf$$.sh -- chmod +x conf$$.sh -- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then -- PATH_SEPARATOR=';' -+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 -- PATH_SEPARATOR=: -+ 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 -- rm -f conf$$.sh -+ export as_echo_body -+ as_echo='sh -c $as_echo_body as_echo' - fi - --# Support unset when possible. --if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then -- as_unset=unset --else -- as_unset=false -+# 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 - - -@@ -6454,20 +5190,19 @@ fi - # 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.) --as_nl=' --' - IFS=" "" $as_nl" - - # Find who we are. Look in the path if we contain no directory separator. --case $0 in -+as_myself= -+case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR - for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break --done -+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -+ done - IFS=$as_save_IFS - - ;; -@@ -6478,32 +5213,111 @@ if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then -- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 -- { (exit 1); exit 1; } -+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 -+ exit 1 - fi - --# Work around bugs in pre-3.0 UWIN ksh. --for as_var in ENV MAIL MAILPATH --do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -+# Unset variables that we do not need and which cause bugs (e.g. in -+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -+# suppresses any "Segmentation fault" message there. '((' could -+# trigger a bug in pdksh 5.2.14. -+for as_var in BASH_ENV ENV MAIL MAILPATH -+do eval test x\${$as_var+set} = xset \ -+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : - done - PS1='$ ' - PS2='> ' - PS4='+ ' - - # NLS nuisances. --for as_var in \ -- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ -- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ -- LC_TELEPHONE LC_TIME --do -- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then -- eval $as_var=C; export $as_var -- else -- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -+LC_ALL=C -+export LC_ALL -+LANGUAGE=C -+export LANGUAGE -+ -+# CDPATH. -+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH -+ -+ -+# as_fn_error STATUS ERROR [LINENO LOG_FD] -+# ---------------------------------------- -+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -+# script with STATUS, using 1 if that was 0. -+as_fn_error () -+{ -+ as_status=$1; test $as_status -eq 0 && as_status=1 -+ if test "$4"; then -+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi --done -+ $as_echo "$as_me: error: $2" >&2 -+ as_fn_exit $as_status -+} # as_fn_error -+ -+ -+# as_fn_set_status STATUS -+# ----------------------- -+# Set $? to STATUS, without forking. -+as_fn_set_status () -+{ -+ return $1 -+} # as_fn_set_status -+ -+# as_fn_exit STATUS -+# ----------------- -+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -+as_fn_exit () -+{ -+ set +e -+ as_fn_set_status $1 -+ exit $1 -+} # as_fn_exit -+ -+# as_fn_unset VAR -+# --------------- -+# Portably unset VAR. -+as_fn_unset () -+{ -+ { eval $1=; unset $1;} -+} -+as_unset=as_fn_unset -+# as_fn_append VAR VALUE -+# ---------------------- -+# Append the text in VALUE to the end of the definition contained in VAR. Take -+# advantage of any shell optimizations that allow amortized linear growth over -+# repeated appends, instead of the typical quadratic growth present in naive -+# implementations. -+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : -+ eval 'as_fn_append () -+ { -+ eval $1+=\$2 -+ }' -+else -+ as_fn_append () -+ { -+ eval $1=\$$1\$2 -+ } -+fi # as_fn_append -+ -+# as_fn_arith ARG... -+# ------------------ -+# Perform arithmetic evaluation on the ARGs, and store the result in the -+# global $as_val. Take advantage of shells that can avoid forks. The arguments -+# must be portable across $(()) and expr. -+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : -+ eval 'as_fn_arith () -+ { -+ as_val=$(( $* )) -+ }' -+else -+ as_fn_arith () -+ { -+ as_val=`expr "$@" || test $? -eq 1` -+ } -+fi # as_fn_arith -+ - --# Required to use basename. - if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -@@ -6517,13 +5331,17 @@ else - as_basename=false - fi - -+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then -+ as_dirname=dirname -+else -+ as_dirname=false -+fi - --# Name of the executable. - as_me=`$as_basename -- "$0" || - $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || --echo X/"$0" | -+$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q -@@ -6538,104 +5356,103 @@ echo X/"$0" | - } - s/.*/./; q'` - --# CDPATH. --$as_unset CDPATH -- -- -- -- as_lineno_1=$LINENO -- as_lineno_2=$LINENO -- test "x$as_lineno_1" != "x$as_lineno_2" && -- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { -- -- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO -- # uniformly replaced by the line number. The first 'sed' inserts a -- # line-number line after each line using $LINENO; the second 'sed' -- # does the real work. The second script uses 'N' to pair each -- # line-number line with the line containing $LINENO, and appends -- # trailing '-' during substitution so that $LINENO is not a special -- # case at line end. -- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the -- # scripts with optimization help from Paolo Bonzini. Blame Lee -- # E. McMahon (1931-1989) for sed's syntax. :-) -- sed -n ' -- p -- /[$]LINENO/= -- ' <$as_myself | -- sed ' -- s/[$]LINENO.*/&-/ -- t lineno -- b -- :lineno -- N -- :loop -- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ -- t loop -- s/-\n.*// -- ' >$as_me.lineno && -- chmod +x "$as_me.lineno" || -- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 -- { (exit 1); exit 1; }; } -- -- # Don't try to exec as it changes $[0], causing all sort of problems -- # (the dirname of $[0] is not the place where we might find the -- # original and so on. Autoconf is especially sensitive to this). -- . "./$as_me.lineno" -- # Exit status is that of the last command. -- exit --} -- -- --if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then -- as_dirname=dirname --else -- as_dirname=false --fi -+# Avoid depending upon Character Ranges. -+as_cr_letters='abcdefghijklmnopqrstuvwxyz' -+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -+as_cr_Letters=$as_cr_letters$as_cr_LETTERS -+as_cr_digits='0123456789' -+as_cr_alnum=$as_cr_Letters$as_cr_digits - - ECHO_C= ECHO_N= ECHO_T= --case `echo -n x` in -+case `echo -n x` in #((((( - -n*) -- case `echo 'x\c'` in -+ case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. -- *) ECHO_C='\c';; -+ xy) ECHO_C='\c';; -+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null -+ ECHO_T=' ';; - esac;; - *) - ECHO_N='-n';; - esac - --if expr a : '\(a\)' >/dev/null 2>&1 && -- test "X`expr 00001 : '.*\(...\)'`" = X001; then -- as_expr=expr --else -- as_expr=false --fi -- - rm -f conf$$ conf$$.exe conf$$.file - if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file - else - rm -f conf$$.dir -- mkdir conf$$.dir --fi --echo >conf$$.file --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 || -+ 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' --elif ln conf$$.file conf$$ 2>/dev/null; then -- as_ln_s=ln -+ 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=: -+ as_mkdir_p='mkdir -p "$as_dir"' - else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -@@ -6652,12 +5469,12 @@ else - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then -- test -d "$1/."; -+ test -d "$1/."; - else -- case $1 in -- -*)set "./$1";; -+ case $1 in #( -+ -*)set "./$1";; - esac; -- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in -+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -@@ -6672,13 +5489,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - exec 6>&1 -+## ----------------------------------- ## -+## Main body of $CONFIG_STATUS script. ## -+## ----------------------------------- ## -+_ASEOF -+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - --# Save the log message, to keep $[0] and so on meaningful, and to -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -+# Save the log message, to keep $0 and so on meaningful, and to - # report actual input values of CONFIG_FILES etc. instead of their - # values after options handling. - ac_log=" - This file was extended by cloudfuse $as_me 0.9, which was --generated by GNU Autoconf 2.61. Invocation command line was -+generated by GNU Autoconf 2.68. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS -@@ -6691,29 +5514,41 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q` - - _ACEOF - --cat >>$CONFIG_STATUS <<_ACEOF -+case $ac_config_files in *" -+"*) set x $ac_config_files; shift; ac_config_files=$*;; -+esac -+ -+case $ac_config_headers in *" -+"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -+esac -+ -+ -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - # Files that config.status was made for. - config_files="$ac_config_files" - config_headers="$ac_config_headers" - - _ACEOF - --cat >>$CONFIG_STATUS <<\_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - ac_cs_usage="\ --\`$as_me' instantiates files from templates according to the --current configuration. -+\`$as_me' instantiates files and other configuration actions -+from templates according to the current configuration. Unless the files -+and actions are specified as TAGs, all are instantiated by default. - --Usage: $0 [OPTIONS] [FILE]... -+Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit -- -q, --quiet do not print progress messages -+ --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 -- --header=FILE[:TEMPLATE] -- instantiate the configuration header FILE -+ --file=FILE[:TEMPLATE] -+ instantiate the configuration file FILE -+ --header=FILE[:TEMPLATE] -+ instantiate the configuration header FILE - - Configuration files: - $config_files -@@ -6721,16 +5556,17 @@ $config_files - Configuration headers: - $config_headers - --Report bugs to ." -+Report bugs to >." - - _ACEOF --cat >>$CONFIG_STATUS <<_ACEOF -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" - ac_cs_version="\\ - cloudfuse config.status 0.9 --configured by $0, generated by GNU Autoconf 2.61, -- with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -+configured by $0, generated by GNU Autoconf 2.68, -+ with options \\"\$ac_cs_config\\" - --Copyright (C) 2006 Free Software Foundation, Inc. -+Copyright (C) 2010 Free Software Foundation, Inc. - This config.status script is free software; the Free Software Foundation - gives unlimited permission to copy, distribute and modify it." - -@@ -6738,20 +5574,25 @@ ac_pwd='$ac_pwd' - srcdir='$srcdir' - INSTALL='$INSTALL' - MKDIR_P='$MKDIR_P' -+test -n "\$AWK" || AWK=awk - _ACEOF - --cat >>$CONFIG_STATUS <<\_ACEOF --# If no file are specified by the user, then we need to provide default --# value. By we need to know if files were specified by the user. -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -+# The default lists apply if the user does not specify any file. - ac_need_defaults=: - while test $# != 0 - do - case $1 in -- --*=*) -+ --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; -+ --*=) -+ ac_option=`expr "X$1" : 'X\([^=]*\)='` -+ ac_optarg= -+ ac_shift=: -+ ;; - *) - ac_option=$1 - ac_optarg=$2 -@@ -6764,34 +5605,41 @@ do - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) -- echo "$ac_cs_version"; exit ;; -+ $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 -- CONFIG_FILES="$CONFIG_FILES $ac_optarg" -+ case $ac_optarg in -+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; -+ '') as_fn_error $? "missing file argument" ;; -+ esac -+ as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift -- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" -+ case $ac_optarg in -+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; -+ esac -+ as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header -- { echo "$as_me: error: ambiguous option: $1 --Try \`$0 --help' for more information." >&2 -- { (exit 1); exit 1; }; };; -+ as_fn_error $? "ambiguous option: \`$1' -+Try \`$0 --help' for more information.";; - --help | --hel | -h ) -- echo "$ac_cs_usage"; exit ;; -+ $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. -- -*) { echo "$as_me: error: unrecognized option: $1 --Try \`$0 --help' for more information." >&2 -- { (exit 1); exit 1; }; } ;; -+ -*) as_fn_error $? "unrecognized option: \`$1' -+Try \`$0 --help' for more information." ;; - -- *) ac_config_targets="$ac_config_targets $1" -+ *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac -@@ -6806,30 +5654,32 @@ if $ac_cs_silent; then - fi - - _ACEOF --cat >>$CONFIG_STATUS <<_ACEOF -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - if \$ac_cs_recheck; then -- echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 -- CONFIG_SHELL=$SHELL -+ 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 $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -+ exec "\$@" - fi - - _ACEOF --cat >>$CONFIG_STATUS <<\_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 -- echo "$ac_log" -+ $as_echo "$ac_log" - } >&5 - - _ACEOF --cat >>$CONFIG_STATUS <<_ACEOF -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - _ACEOF - --cat >>$CONFIG_STATUS <<\_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - - # Handling of arguments. - for ac_config_target in $ac_config_targets -@@ -6838,9 +5688,7 @@ do - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - -- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 --echo "$as_me: error: invalid argument: $ac_config_target" >&2;} -- { (exit 1); exit 1; }; };; -+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac - done - -@@ -6862,171 +5710,302 @@ fi - # after its creation but before its name has been assigned to `$tmp'. - $debug || - { -- tmp= -+ tmp= ac_tmp= - trap 'exit_status=$? -- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -+ : "${ac_tmp:=$tmp}" -+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status - ' 0 -- trap '{ (exit 1); exit 1; }' 1 2 13 15 -+ trap 'as_fn_exit 1' 1 2 13 15 - } - # Create a (secure) tmp directory for tmp files. - - { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && -- test -n "$tmp" && test -d "$tmp" -+ test -d "$tmp" - } || - { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") --} || --{ -- echo "$me: cannot create a temporary directory in ." >&2 -- { (exit 1); exit 1; } --} -- --# --# Set up the sed scripts for CONFIG_FILES section. --# -+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -+ac_tmp=$tmp - --# No need to generate the scripts if there are no CONFIG_FILES. --# This happens for instance when ./config.status config.h -+# 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 - --_ACEOF - -+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 {' >"$ac_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 -- cat >conf$$subs.sed <<_ACEOF --SHELL!$SHELL$ac_delim --PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim --PACKAGE_NAME!$PACKAGE_NAME$ac_delim --PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim --PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim --PACKAGE_STRING!$PACKAGE_STRING$ac_delim --PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim --exec_prefix!$exec_prefix$ac_delim --prefix!$prefix$ac_delim --program_transform_name!$program_transform_name$ac_delim --bindir!$bindir$ac_delim --sbindir!$sbindir$ac_delim --libexecdir!$libexecdir$ac_delim --datarootdir!$datarootdir$ac_delim --datadir!$datadir$ac_delim --sysconfdir!$sysconfdir$ac_delim --sharedstatedir!$sharedstatedir$ac_delim --localstatedir!$localstatedir$ac_delim --includedir!$includedir$ac_delim --oldincludedir!$oldincludedir$ac_delim --docdir!$docdir$ac_delim --infodir!$infodir$ac_delim --htmldir!$htmldir$ac_delim --dvidir!$dvidir$ac_delim --pdfdir!$pdfdir$ac_delim --psdir!$psdir$ac_delim --libdir!$libdir$ac_delim --localedir!$localedir$ac_delim --mandir!$mandir$ac_delim --DEFS!$DEFS$ac_delim --ECHO_C!$ECHO_C$ac_delim --ECHO_N!$ECHO_N$ac_delim --ECHO_T!$ECHO_T$ac_delim --LIBS!$LIBS$ac_delim --build_alias!$build_alias$ac_delim --host_alias!$host_alias$ac_delim --target_alias!$target_alias$ac_delim --CC!$CC$ac_delim --CFLAGS!$CFLAGS$ac_delim --LDFLAGS!$LDFLAGS$ac_delim --CPPFLAGS!$CPPFLAGS$ac_delim --ac_ct_CC!$ac_ct_CC$ac_delim --EXEEXT!$EXEEXT$ac_delim --OBJEXT!$OBJEXT$ac_delim --INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim --INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim --INSTALL_DATA!$INSTALL_DATA$ac_delim --PKG_CONFIG!$PKG_CONFIG$ac_delim --XML_CFLAGS!$XML_CFLAGS$ac_delim --XML_LIBS!$XML_LIBS$ac_delim --CURL_CFLAGS!$CURL_CFLAGS$ac_delim --CURL_LIBS!$CURL_LIBS$ac_delim --FUSE_CFLAGS!$FUSE_CFLAGS$ac_delim --FUSE_LIBS!$FUSE_LIBS$ac_delim --ALLOCA!$ALLOCA$ac_delim --CPP!$CPP$ac_delim --GREP!$GREP$ac_delim --EGREP!$EGREP$ac_delim --LIBOBJS!$LIBOBJS$ac_delim --LTLIBOBJS!$LTLIBOBJS$ac_delim --_ACEOF -+ . ./conf$$subs.sh || -+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - -- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 60; then -+ 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 -- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 --echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} -- { (exit 1); exit 1; }; } -+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi - done -+rm -f conf$$subs.sh -+ -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+cat >>"\$ac_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 >>"\$ac_tmp/subs1.awk" <<_ACAWK && -+ for (key in S) S_is_set[key] = 1 -+ FS = "" - --ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` --if test -n "$ac_eof"; then -- ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` -- ac_eof=`expr $ac_eof + 1` --fi -+} -+{ -+ 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 -+} - --cat >>$CONFIG_STATUS <<_ACEOF --cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof --/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -+_ACAWK - _ACEOF --sed ' --s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g --s/^/s,@/; s/!/@,|#_!!_#|/ --:n --t n --s/'"$ac_delim"'$/,g/; t --s/$/\\/; p --N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n --' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF --:end --s/|#_!!_#|//g --CEOF$ac_eof -+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 < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ -+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 - _ACEOF - -- --# VPATH may cause trouble with some makes, so we remove $(srcdir), --# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -+# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and - # trailing colons and then remove the whole line if VPATH becomes empty - # (actually we leave an empty line to preserve line numbers). - if test "x$srcdir" = x.; then -- ac_vpsub='/^[ ]*VPATH[ ]*=/{ --s/:*\$(srcdir):*/:/ --s/:*\${srcdir}:*/:/ --s/:*@srcdir@:*/:/ --s/^\([^=]*=[ ]*\):*/\1/ -+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -+h -+s/// -+s/^/:/ -+s/[ ]*$/:/ -+s/:\$(srcdir):/:/g -+s/:\${srcdir}:/:/g -+s/:@srcdir@:/:/g -+s/^:*// - s/:*$// -+x -+s/\(=[ ]*\).*/\1/ -+G -+s/\n// - s/^[^=]*=[ ]*$// - }' - fi - --cat >>$CONFIG_STATUS <<\_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - fi # test -n "$CONFIG_FILES" - -+# Set up the scripts for CONFIG_HEADERS section. -+# No need to generate them if there are no CONFIG_HEADERS. -+# This happens for instance with `./config.status Makefile'. -+if test -n "$CONFIG_HEADERS"; then -+cat >"$ac_tmp/defines.awk" <<\_ACAWK || -+BEGIN { -+_ACEOF -+ -+# Transform confdefs.h into an awk script `defines.awk', embedded as -+# here-document in config.status, that substitutes the proper values into -+# config.h.in to produce config.h. -+ -+# Create a delimiter string that does not exist in confdefs.h, to ease -+# handling of long lines. -+ac_delim='%!_!# ' -+for ac_last_try in false false :; do -+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h` -+ if test -z "$ac_tt"; then -+ break -+ elif $ac_last_try; then -+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 -+ else -+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! " -+ fi -+done -+ -+# For the awk script, D is an array of macro values keyed by name, -+# likewise P contains macro parameters if any. Preserve backslash -+# newline sequences. -+ -+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -+sed -n ' -+s/.\{148\}/&'"$ac_delim"'/g -+t rset -+:rset -+s/^[ ]*#[ ]*define[ ][ ]*/ / -+t def -+d -+:def -+s/\\$// -+t bsnl -+s/["\\]/\\&/g -+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -+D["\1"]=" \3"/p -+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -+d -+:bsnl -+s/["\\]/\\&/g -+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -+D["\1"]=" \3\\\\\\n"\\/p -+t cont -+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -+t cont -+d -+:cont -+n -+s/.\{148\}/&'"$ac_delim"'/g -+t clear -+:clear -+s/\\$// -+t bsnlc -+s/["\\]/\\&/g; s/^/"/; s/$/"/p -+d -+:bsnlc -+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -+b cont -+' >$CONFIG_STATUS || ac_write_fail=1 -+ -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+ for (key in D) D_is_set[key] = 1 -+ FS = "" -+} -+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { -+ line = \$ 0 -+ split(line, arg, " ") -+ if (arg[1] == "#") { -+ defundef = arg[2] -+ mac1 = arg[3] -+ } else { -+ defundef = substr(arg[1], 2) -+ mac1 = arg[2] -+ } -+ split(mac1, mac2, "(") #) -+ macro = mac2[1] -+ prefix = substr(line, 1, index(line, defundef) - 1) -+ if (D_is_set[macro]) { -+ # Preserve the white space surrounding the "#". -+ print prefix "define", macro P[macro] D[macro] -+ next -+ } else { -+ # Replace #undef with comments. This is necessary, for example, -+ # in the case of _POSIX_SOURCE, which is predefined and required -+ # on some systems where configure will not decide to define it. -+ if (defundef == "undef") { -+ print "/*", prefix defundef, macro, "*/" -+ next -+ } -+ } -+} -+{ print } -+_ACAWK -+_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -+fi # test -n "$CONFIG_HEADERS" -+ - --for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS -+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " -+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*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 --echo "$as_me: error: Invalid tag $ac_tag." >&2;} -- { (exit 1); exit 1; }; };; -+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac -@@ -7045,7 +6024,7 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;} - for ac_f - do - case $ac_f in -- -) ac_f="$tmp/stdin";; -+ -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. -@@ -7054,26 +6033,34 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;} - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || -- { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 --echo "$as_me: error: cannot find input file: $ac_f" >&2;} -- { (exit 1); exit 1; }; };; -+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac -- ac_file_inputs="$ac_file_inputs $ac_f" -+ 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 "`IFS=: -- echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." -+ 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" -- { echo "$as_me:$LINENO: creating $ac_file" >&5 --echo "$as_me: creating $ac_file" >&6;} -+ { $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";; -+ *:-:* | *:-) cat >"$ac_tmp/stdin" \ -+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac -@@ -7083,42 +6070,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || --echo X"$ac_file" | -- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ -- s//\1/ -- q -- } -- /^X\(\/\/\)[^/].*/{ -- s//\1/ -- q -- } -- /^X\(\/\/\)$/{ -- s//\1/ -- q -- } -- /^X\(\/\).*/{ -- s//\1/ -- q -- } -- s/.*/./; q'` -- { as_dir="$ac_dir" -- case $as_dir in #( -- -*) as_dir=./$as_dir;; -- esac -- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { -- as_dirs= -- while :; do -- case $as_dir in #( -- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( -- *) as_qdir=$as_dir;; -- esac -- as_dirs="'$as_qdir' $as_dirs" -- as_dir=`$as_dirname -- "$as_dir" || --$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -- X"$as_dir" : 'X\(//\)[^/]' \| \ -- X"$as_dir" : 'X\(//\)$' \| \ -- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || --echo X"$as_dir" | -+$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q -@@ -7136,20 +6088,15 @@ echo X"$as_dir" | - q - } - s/.*/./; q'` -- test -d "$as_dir" && break -- done -- test -z "$as_dirs" || eval "mkdir $as_dirs" -- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 --echo "$as_me: error: cannot create directory $as_dir" >&2;} -- { (exit 1); exit 1; }; }; } -+ as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - - case "$ac_dir" in - .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) -- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` -+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. -- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` -+ 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/ ;; -@@ -7194,12 +6141,12 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - esac - _ACEOF - --cat >>$CONFIG_STATUS <<\_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= -- --case `sed -n '/datarootdir/ { -+ac_sed_dataroot=' -+/datarootdir/ { - p - q - } -@@ -7207,36 +6154,37 @@ case `sed -n '/datarootdir/ { - /@docdir@/p - /@infodir@/p - /@localedir@/p --/@mandir@/p --' $ac_file_inputs` in -+/@mandir@/p' -+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in - *datarootdir*) ac_datarootdir_seen=yes;; - *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) -- { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 --echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -+ { $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 -+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' ;; -+ 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 -- sed "$ac_vpsub -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+ac_sed_extra="$ac_vpsub - $extrasub - _ACEOF --cat >>$CONFIG_STATUS <<\_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - :t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b --s&@configure_input@&$configure_input&;t t -+s|@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 -@@ -7247,119 +6195,49 @@ 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 --" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out -+" -+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ -+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - - test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && -- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && -- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && -- { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' --which seems to be undefined. Please make sure it is defined." >&5 --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" -+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && -+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ -+ "$ac_tmp/out"`; test -z "$ac_out"; } && -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -+which seems to be undefined. Please make sure it is defined" >&5 -+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -+which seems to be undefined. Please make sure it is defined" >&2;} -+ -+ rm -f "$ac_tmp/stdin" - case $ac_file in -- -) cat "$tmp/out"; rm -f "$tmp/out";; -- *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; -- esac -+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; -+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; -+ esac \ -+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # --_ACEOF -- --# Transform confdefs.h into a sed script `conftest.defines', that --# substitutes the proper values into config.h.in to produce config.h. --rm -f conftest.defines conftest.tail --# First, append a space to every undef/define line, to ease matching. --echo 's/$/ /' >conftest.defines --# Then, protect against being on the right side of a sed subst, or in --# an unquoted here document, in config.status. If some macros were --# called several times there might be several #defines for the same --# symbol, which is useless. But do not sort them, since the last --# AC_DEFINE must be honored. --ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* --# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where --# NAME is the cpp macro being defined, VALUE is the value it is being given. --# PARAMS is the parameter list in the macro definition--in most cases, it's --# just an empty string. --ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' --ac_dB='\\)[ (].*,\\1define\\2' --ac_dC=' ' --ac_dD=' ,' -- --uniq confdefs.h | -- sed -n ' -- t rset -- :rset -- s/^[ ]*#[ ]*define[ ][ ]*// -- t ok -- d -- :ok -- s/[\\&,]/\\&/g -- s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p -- s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p -- ' >>conftest.defines -- --# Remove the space that was appended to ease matching. --# Then replace #undef with comments. This is necessary, for --# example, in the case of _POSIX_SOURCE, which is predefined and required --# on some systems where configure will not decide to define it. --# (The regexp can be short, since the line contains either #define or #undef.) --echo 's/ $// --s,^[ #]*u.*,/* & */,' >>conftest.defines -- --# Break up conftest.defines: --ac_max_sed_lines=50 -- --# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" --# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" --# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" --# et cetera. --ac_in='$ac_file_inputs' --ac_out='"$tmp/out1"' --ac_nxt='"$tmp/out2"' -- --while : --do -- # Write a here document: -- cat >>$CONFIG_STATUS <<_ACEOF -- # First, check the format of the line: -- cat >"\$tmp/defines.sed" <<\\CEOF --/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def --/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def --b --:def --_ACEOF -- sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS -- echo 'CEOF -- sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS -- ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in -- sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail -- grep . conftest.tail >/dev/null || break -- rm -f conftest.defines -- mv conftest.tail conftest.defines --done --rm -f conftest.defines conftest.tail -- --echo "ac_result=$ac_in" >>$CONFIG_STATUS --cat >>$CONFIG_STATUS <<\_ACEOF - if test x"$ac_file" != x-; then -- echo "/* $configure_input */" >"$tmp/config.h" -- cat "$ac_result" >>"$tmp/config.h" -- if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then -- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 --echo "$as_me: $ac_file is unchanged" >&6;} -+ { -+ $as_echo "/* $configure_input */" \ -+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" -+ } >"$ac_tmp/config.h" \ -+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 -+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -+$as_echo "$as_me: $ac_file is unchanged" >&6;} - else -- rm -f $ac_file -- mv "$tmp/config.h" $ac_file -+ rm -f "$ac_file" -+ mv "$ac_tmp/config.h" "$ac_file" \ -+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else -- echo "/* $configure_input */" -- cat "$ac_result" -+ $as_echo "/* $configure_input */" \ -+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ -+ || as_fn_error $? "could not create -" "$LINENO" 5 - fi -- rm -f "$tmp/out12" - ;; - - -@@ -7368,11 +6246,13 @@ echo "$as_me: $ac_file is unchanged" >&6;} - done # for ac_tag - - --{ (exit 0); exit 0; } -+as_fn_exit 0 - _ACEOF --chmod +x $CONFIG_STATUS - ac_clean_files=$ac_clean_files_save - -+test $ac_write_fail = 0 || -+ as_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. -@@ -7392,6 +6272,10 @@ if test "$no_create" != yes; then - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. -- $ac_cs_success || { (exit 1); exit 1; } -+ $ac_cs_success || as_fn_exit 1 -+fi -+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} - fi - --- -1.7.9.5 - diff --git a/debian/patches/0015-make-Makefile-obey-DESTDIR.txt b/debian/patches/0015-make-Makefile-obey-DESTDIR.txt deleted file mode 100644 index 0b8c049..0000000 --- a/debian/patches/0015-make-Makefile-obey-DESTDIR.txt +++ /dev/null @@ -1,25 +0,0 @@ -From f2619ee2bf5249d15bc9bd4db4785c7c4b61433d Mon Sep 17 00:00:00 2001 -From: Mike Lundy -Date: Wed, 31 Aug 2011 16:09:54 -0700 -Subject: [PATCH 15/17] make Makefile obey DESTDIR - ---- - Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.in b/Makefile.in -index 05a22c5..3159c7f 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -9,7 +9,7 @@ INSTALL = @INSTALL@ - MKDIR_P = @MKDIR_P@ - prefix = @prefix@ - exec_prefix = @exec_prefix@ --bindir = $(exec_prefix)/bin -+bindir = $(DESTDIR)$(exec_prefix)/bin - - SOURCES=cloudfsapi.c cloudfuse.c - HEADERS=cloudfsapi.h --- -1.7.9.5 - diff --git a/debian/patches/0016-Only-include-alloca.h-for-Linux-Certainly-not-for-NetB.txt b/debian/patches/0016-Only-include-alloca.h-for-Linux-Certainly-not-for-NetB.txt deleted file mode 100644 index 536755a..0000000 --- a/debian/patches/0016-Only-include-alloca.h-for-Linux-Certainly-not-for-NetB.txt +++ /dev/null @@ -1,27 +0,0 @@ -From 556b887300db437f55cf61e9acb9c5ca5065b404 Mon Sep 17 00:00:00 2001 -From: David Brownlee -Date: Fri, 14 Oct 2011 18:25:40 +0100 -Subject: [PATCH 16/17] Only include for Linux (Certainly not for - NetBSD) - ---- - cloudfsapi.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/cloudfsapi.c b/cloudfsapi.c -index 0940da0..b983567 100644 ---- a/cloudfsapi.c -+++ b/cloudfsapi.c -@@ -4,7 +4,9 @@ - #include - #include - #include -+#ifdef __linux__ - #include -+#endif - #include - #include - #include --- -1.7.9.5 - diff --git a/debian/patches/0017-parse-size-with-strtoll-Joseph-Dunn.txt b/debian/patches/0017-parse-size-with-strtoll-Joseph-Dunn.txt deleted file mode 100644 index 777e589..0000000 --- a/debian/patches/0017-parse-size-with-strtoll-Joseph-Dunn.txt +++ /dev/null @@ -1,25 +0,0 @@ -From 1003a82747e5560488df1b79f691f1ca3d0ddbbe Mon Sep 17 00:00:00 2001 -From: Mike Barton -Date: Tue, 24 Jan 2012 23:00:35 +0400 -Subject: [PATCH 17/17] parse size with strtoll (Joseph Dunn) - ---- - cloudfsapi.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cloudfsapi.c b/cloudfsapi.c -index b983567..ba14035 100644 ---- a/cloudfsapi.c -+++ b/cloudfsapi.c -@@ -286,7 +286,7 @@ int list_directory(const char *path, dir_entry **dir_list) - de->full_name = NULL; - } - if (!strcasecmp((const char *)anode->name, "bytes")) -- de->size = atoi(content); -+ de->size = strtoll(content, NULL, 10); - if (!strcasecmp((const char *)anode->name, "content_type")) - { - de->content_type = strdup(content); --- -1.7.9.5 - diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index ea7fc2b..0000000 --- a/debian/patches/series +++ /dev/null @@ -1,17 +0,0 @@ -0001-lock-mutex-around-login.txt -0002-clear-xml-context-correctly-on-401.txt -0003-change-how-xml-context-is-reset-on-re-auth.txt -0004-improve-retry-logic-fix-multithreading-problems.txt -0005-don-t-verify-peer-on-auth.-TODO-make-that-an-option.txt -0006-even-unsafer-ssl-options.txt -0007-Clean-up-C-code-remove-nested-functions.txt -0008-Implement-rename-using-the-Copy-object-functionality.txt -0009-add-contributors-to-README.txt -0010-protect-directories-from-rename.txt -0011-arrange-code-back-to-my-preference.txt -0012-remove-deprecated-unneeded-include.txt -0013-add-openssl-to-the-configure-discovery.txt -0014-regenerate-configure.txt -0015-make-Makefile-obey-DESTDIR.txt -0016-Only-include-alloca.h-for-Linux-Certainly-not-for-NetB.txt -0017-parse-size-with-strtoll-Joseph-Dunn.txt From b5b7db96b257414f2347eaba659206f323c78756 Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Fri, 27 Dec 2013 02:23:47 -0600 Subject: [PATCH 15/42] the callback was needed --- cloudfsapi.c | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 861210e..80ce52d 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -24,6 +24,10 @@ #define REQUEST_RETRIES 4 +// 64 bit time + nanoseconds +#define TIME_CHARS 32 + + static char storage_url[MAX_URL_SIZE]; static char storage_token[MAX_HEADER_SIZE]; static pthread_mutex_t pool_mut; @@ -93,9 +97,18 @@ static void add_header(curl_slist **headers, const char *name, *headers = curl_slist_append(*headers, x_header); } -static int send_request_size(char *method, const char *path, FILE *fp, +static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) +{ + struct segment_info *info = (struct segment_info *)userp; + + size_t amt_read = fread(ptr, 1, info->size, info->fp); + info->size -= amt_read; + return amt_read; +} + +static int send_request_size(char *method, const char *path, void *fp, xmlParserCtxtPtr xmlctx, curl_slist *extra_headers, - off_t file_size) + off_t file_size, int is_segment) { char url[MAX_URL_SIZE]; char *slash; @@ -155,6 +168,8 @@ static int send_request_size(char *method, const char *path, FILE *fp, curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); curl_easy_setopt(curl, CURLOPT_INFILESIZE, file_size); curl_easy_setopt(curl, CURLOPT_READDATA, fp); + if (is_segment) + curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); } else if (!strcasecmp(method, "GET")) { @@ -209,7 +224,7 @@ static int send_request(char *method, const char *path, FILE *fp, if (fp) flen = cloudfs_file_size(fileno(fp)); - return send_request_size(method, path, fp, xmlctx, extra_headers, flen); + return send_request_size(method, path, fp, xmlctx, extra_headers, flen, 0); } @@ -268,6 +283,8 @@ void cloudfs_init() } } + + void *upload_segment(void *seginfo) { char seg_path[MAX_URL_SIZE]; @@ -278,8 +295,8 @@ void *upload_segment(void *seginfo) snprintf(seg_path, MAX_URL_SIZE, "%s%08i", info->seg_base, info->part); char *encoded = curl_escape(seg_path, 0); - int response = send_request_size("PUT", encoded, info->fp, NULL, NULL, - info->size); + int response = send_request_size("PUT", encoded, info, NULL, NULL, + info->size, 1); if (!(response >= 200 && response < 300)) fprintf(stderr, "Segment upload %s failed with response %d", seg_path, @@ -307,8 +324,16 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) char manifest[MAX_URL_SIZE]; - // TODO: actually set this to now - char *meta_mtime = "1386971541.005863"; + // The best we can do here is to get the current time that way tools that + // use the mtime can at least check if the file was changing after now + struct timespec now; + clock_gettime(CLOCK_REALTIME, &now); + + char string_float[TIME_CHARS]; + snprintf(string_float, TIME_CHARS, "%lu.%lu", now.tv_sec, now.tv_nsec); + + char meta_mtime[TIME_CHARS]; + snprintf(meta_mtime, TIME_CHARS, "%f", atof(string_float)); char seg_base[MAX_URL_SIZE]; char file_path[PATH_MAX]; @@ -352,12 +377,15 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) pthread_join(threads[i], NULL); } + free(info); + free(threads); + char *encoded = curl_escape(path, 0); curl_slist *headers = NULL; add_header(&headers, "x-object-manifest", manifest); add_header(&headers, "x-object-meta-mtime", meta_mtime); add_header(&headers, "Content-Length", "0"); - response = send_request_size("PUT", encoded, NULL, NULL, headers, 0); + response = send_request_size("PUT", encoded, NULL, NULL, headers, 0, 0); curl_slist_free_all(headers); curl_free(encoded); From 0523ece8b78a5f3fbc199d09aa3e1faf09ecf205 Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Fri, 27 Dec 2013 03:03:38 -0600 Subject: [PATCH 16/42] needed to check size --- cloudfsapi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 80ce52d..73c735a 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -100,9 +100,14 @@ static void add_header(curl_slist **headers, const char *name, static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) { struct segment_info *info = (struct segment_info *)userp; + size_t mem = size * nmemb; - size_t amt_read = fread(ptr, 1, info->size, info->fp); + if (mem < 1 || info->size < 1) + return 0; + + size_t amt_read = fread(ptr, 1, info->size < mem ? info->size : mem, info->fp); info->size -= amt_read; + return amt_read; } From da81b62453976465d02a1321310496402ec65974 Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Mon, 30 Dec 2013 16:57:34 -0600 Subject: [PATCH 17/42] creates segment container and handles slashes in container name for segment files --- cloudfsapi.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 73c735a..9b9611c 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -107,7 +107,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) size_t amt_read = fread(ptr, 1, info->size < mem ? info->size : mem, info->fp); info->size -= amt_read; - + return amt_read; } @@ -347,9 +347,30 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) char *string = strdup(path); snprintf(seg_base, MAX_URL_SIZE, "%s", strsep(&string, "/")); - char *container = strsep(&string, "/"); + + char container[MAX_URL_SIZE]; + + strncat(container, strsep(&string, "/"), + MAX_URL_SIZE - strnlen(container, MAX_URL_SIZE)); + char *object = strsep(&string, "/"); + char *remstr; + + while (remstr = strsep(&string, "/")) { + strncat(container, "/", + MAX_URL_SIZE - strnlen(container, MAX_URL_SIZE)); + strncat(container, object, + MAX_URL_SIZE - strnlen(container, MAX_URL_SIZE)); + object = remstr; + } + + // create the segments container + snprintf(manifest, MAX_URL_SIZE, "%s_segments", container); + + cloudfs_create_directory(manifest); + + // reusing manifest snprintf(manifest, MAX_URL_SIZE, "%s_segments/%s/%s/%ld/%ld/", container, object, meta_mtime, flen, segment_size); From 442902602c0fa2121bc61b4a7d5658166add702b Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Wed, 1 Jan 2014 15:02:31 -0600 Subject: [PATCH 18/42] container was uninitialized causing garbage in the url --- cloudfsapi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 9b9611c..cc23d0a 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -340,15 +340,15 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) char meta_mtime[TIME_CHARS]; snprintf(meta_mtime, TIME_CHARS, "%f", atof(string_float)); - char seg_base[MAX_URL_SIZE]; - char file_path[PATH_MAX]; + char seg_base[MAX_URL_SIZE] = ""; + char file_path[PATH_MAX] = ""; int response; char *string = strdup(path); snprintf(seg_base, MAX_URL_SIZE, "%s", strsep(&string, "/")); - char container[MAX_URL_SIZE]; + char container[MAX_URL_SIZE] = ""; strncat(container, strsep(&string, "/"), MAX_URL_SIZE - strnlen(container, MAX_URL_SIZE)); From 7271f51248d8d18b7c484403a72fa166649ef522 Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Thu, 2 Jan 2014 08:59:13 -0600 Subject: [PATCH 19/42] updated README --- README | 13 +++++++++++-- cloudfuse.c | 2 -- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README b/README index 5e30e17..0f43985 100644 --- a/README +++ b/README @@ -1,3 +1,6 @@ +This fork provides symlinks and Swift DLO support. + http://docs.openstack.org/developer/swift/overview_large_objects.html + Cloudfuse is a FUSE application which provides access to Rackspace's Cloud Files (or any installation of Swift). @@ -45,6 +48,8 @@ USE: use_snet=[True to use Rackspace ServiceNet for connections] cache_timeout=[Seconds for directory caching, default 600] verify_ssl=[False to disable SSL cert verification] + segment_size=[Size to use when creating DLOs, default 1073741824] + segment_above=[File size at which to use segments, defult 2147483648] For authenticating with Rackspace's cloud, at minimum "username" and "api_key" must be set. @@ -67,10 +72,10 @@ EXAMPLE: A typical ~/.cloudfuse configuration file for use with Rackspace: username=demo api_key=643afce8b5187d40ba15e4827384fc5b - + # if no region is selected, it will use your default region. # region=DFW - + # if connecting within a Rackspace datacenter, ServiceNet can be # used to avoid bandwidth charges. # use_snet=true @@ -95,6 +100,8 @@ BUGS/SHORTCOMINGS: "application/directory". * Cloud Files limits container and object listings to 10,000 items. cloudfuse won't list more than that many files in a single directory. + * Symlinks are objects containing the target with content-type + "application/link". AWESOME CONTRIBUTORS: @@ -114,3 +121,5 @@ Thanks, and I hope you find it useful. Michael Barton +For info specific to this fork contact Matt Greenway + diff --git a/cloudfuse.c b/cloudfuse.c index 78afbb3..c064895 100644 --- a/cloudfuse.c +++ b/cloudfuse.c @@ -21,8 +21,6 @@ #define OPTION_SIZE 1024 static int cache_timeout; -//long segment_size; -//long segment_above; typedef struct dir_cache { From a8529255304d4131a216787705cf6ef9f24a68f3 Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Thu, 2 Jan 2014 09:35:36 -0600 Subject: [PATCH 20/42] updated documentation --- README | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README b/README index 0f43985..2e03a70 100644 --- a/README +++ b/README @@ -102,6 +102,10 @@ BUGS/SHORTCOMINGS: cloudfuse won't list more than that many files in a single directory. * Symlinks are objects containing the target with content-type "application/link". + * Deleting a DLO does not delete the segments and updating a DLO leaves + the old segments. + * Initial file size of DLOs is 0 because the bytes field when listing a + container is 0 for DLOs. After opening the file the size if correct. AWESOME CONTRIBUTORS: From 374d7a4c51e77dc004482befee3c73158b040002 Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Thu, 2 Jan 2014 11:01:27 -0600 Subject: [PATCH 21/42] documented no way to share --- README | 1 + 1 file changed, 1 insertion(+) diff --git a/README b/README index 2e03a70..88f6799 100644 --- a/README +++ b/README @@ -106,6 +106,7 @@ BUGS/SHORTCOMINGS: the old segments. * Initial file size of DLOs is 0 because the bytes field when listing a container is 0 for DLOs. After opening the file the size if correct. + * You can't view containers from other tenants. AWESOME CONTRIBUTORS: From ee18827f380417da4dfce34576f7d819c9b6e7af Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Tue, 7 Jan 2014 13:39:38 -0600 Subject: [PATCH 22/42] added ability to see other tenant's container --- cloudfsapi.c | 33 +++++++++++++++++++++++++++------ cloudfsapi.h | 3 +++ cloudfuse.c | 12 +++++++++++- 3 files changed, 41 insertions(+), 7 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index cc23d0a..25de39e 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -22,7 +22,7 @@ #define RHEL5_LIBCURL_VERSION 462597 #define RHEL5_CERTIFICATE_FILE "/etc/pki/tls/certs/ca-bundle.crt" -#define REQUEST_RETRIES 4 +#define REQUEST_RETRIES 1 // 64 bit time + nanoseconds #define TIME_CHARS 32 @@ -244,7 +244,9 @@ static size_t header_dispatch(void *ptr, size_t size, size_t nmemb, void *stream { if (!strncasecmp(head, "x-auth-token", size * nmemb)) strncpy(storage_token, value, sizeof(storage_token)); - if (!strncasecmp(head, "x-storage-url", size * nmemb)) + if (override_storage_url[0]) + strncpy(storage_url, override_storage_url, sizeof(storage_url)); + else if (!strncasecmp(head, "x-storage-url", size * nmemb)) strncpy(storage_url, value, sizeof(storage_url)); } return size * nmemb; @@ -288,8 +290,6 @@ void cloudfs_init() } } - - void *upload_segment(void *seginfo) { char seg_path[MAX_URL_SIZE]; @@ -498,8 +498,9 @@ int cloudfs_list_directory(const char *path, dir_entry **dir_list) } response = send_request("GET", container, NULL, xmlctx, NULL); - xmlParseChunk(xmlctx, "", 0, 1); - if (xmlctx->wellFormed && response >= 200 && response < 300) + if (response >= 200 && response < 300) + xmlParseChunk(xmlctx, "", 0, 1); + if (response >= 200 && response < 300 && xmlctx->wellFormed ) { xmlNode *root_element = xmlDocGetRootElement(xmlctx->myDoc); for (onode = root_element->children; onode; onode = onode->next) @@ -578,6 +579,26 @@ int cloudfs_list_directory(const char *path, dir_entry **dir_list) } retval = 1; } + else if (override_storage_url[0]){ + entry_count = 1; + + dir_entry *de = (dir_entry *)malloc(sizeof(dir_entry)); + //de->name = "osdc_public_data"; + de->name = strdup(public_container); + struct tm last_modified; + strptime("1388434648.01238", "%FT%T", &last_modified); + de->last_modified = mktime(&last_modified); + de->content_type = strdup("application/directory"); + if (asprintf(&(de->full_name), "%s/%s", path, de->name) < 0) + de->full_name = NULL; + + de->isdir = 1; + de->islink = 0; + de->size = 4096; + de->next = *dir_list; + *dir_list = de; + retval = 1; + } debugf("entry count: %d", entry_count); diff --git a/cloudfsapi.h b/cloudfsapi.h index 5a81dad..f9e5047 100644 --- a/cloudfsapi.h +++ b/cloudfsapi.h @@ -35,6 +35,9 @@ struct segment_info long segment_size; long segment_above; +char *override_storage_url; +char *public_container; + void cloudfs_init(); void cloudfs_set_credentials(char *username, char *tenant, char *password, char *authurl, char *region, int use_snet); diff --git a/cloudfuse.c b/cloudfuse.c index 78afbb3..a5b9c2b 100644 --- a/cloudfuse.c +++ b/cloudfuse.c @@ -489,6 +489,8 @@ static struct options { char verify_ssl[OPTION_SIZE]; char segment_size[OPTION_SIZE]; char segment_above[OPTION_SIZE]; + char storage_url[OPTION_SIZE]; + char container[OPTION_SIZE]; } options = { .username = "", .password = "", @@ -500,6 +502,8 @@ static struct options { .verify_ssl = "true", .segment_size = "1073741824", .segment_above = "2147483648", + .storage_url = "", + .container = "", }; int parse_option(void *data, const char *arg, int key, struct fuse_args *outargs) @@ -514,7 +518,9 @@ int parse_option(void *data, const char *arg, int key, struct fuse_args *outargs sscanf(arg, " use_snet = %[^\r\n ]", options.use_snet) || sscanf(arg, " verify_ssl = %[^\r\n ]", options.verify_ssl) || sscanf(arg, " segment_above = %[^\r\n ]", options.segment_above) || - sscanf(arg, " segment_size = %[^\r\n ]", options.segment_size)) + sscanf(arg, " segment_size = %[^\r\n ]", options.segment_size) || + sscanf(arg, " storage_url = %[^\r\n ]", options.storage_url) || + sscanf(arg, " container = %[^\r\n ]", options.container)) return 0; if (!strcmp(arg, "-f") || !strcmp(arg, "-d") || !strcmp(arg, "debug")) cloudfs_debug(1); @@ -542,6 +548,8 @@ int main(int argc, char **argv) segment_size = atoll(options.segment_size); segment_above = atoll(options.segment_above); + override_storage_url = options.storage_url; + public_container = options.container; if (!*options.username || !*options.password) { @@ -559,6 +567,8 @@ int main(int argc, char **argv) fprintf(stderr, " verify_ssl=[False to disable SSL cert verification]\n"); fprintf(stderr, " segment_size=[Size to use when creating DLOs, default 1073741824]\n"); fprintf(stderr, " segment_above=[File size at which to use segments, defult 2147483648]\n"); + fprintf(stderr, " storage_url=[Storage URL for other tenant to view container]\n"); + fprintf(stderr, " container=[Public container to view of tenant specified by storage_url]\n"); return 1; } From 7aa9f1355515cd95c30b37c54dc09a48c1ba3d47 Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Tue, 7 Jan 2014 13:41:01 -0600 Subject: [PATCH 23/42] updated README --- README | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README b/README index 88f6799..7b36011 100644 --- a/README +++ b/README @@ -1,4 +1,5 @@ -This fork provides symlinks and Swift DLO support. +This fork provides symlinks, the ability to see other tenant's containers and +Swift DLO support: http://docs.openstack.org/developer/swift/overview_large_objects.html Cloudfuse is a FUSE application which provides access to Rackspace's @@ -50,6 +51,8 @@ USE: verify_ssl=[False to disable SSL cert verification] segment_size=[Size to use when creating DLOs, default 1073741824] segment_above=[File size at which to use segments, defult 2147483648] + storage_url=[Storage URL for other tenant to view container] + container=[Public container to view of tenant specified by storage_url] For authenticating with Rackspace's cloud, at minimum "username" and "api_key" must be set. From 3ff85de5ac8e22a4b5ef32c24afe6ce357caacb7 Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Fri, 10 Jan 2014 14:19:05 -0600 Subject: [PATCH 24/42] fast mounting of public container and checks not (options.storage_url ^ options.container)) --- cloudfsapi.c | 8 ++++++-- cloudfuse.c | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 25de39e..8fefc69 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -497,7 +497,11 @@ int cloudfs_list_directory(const char *path, dir_entry **dir_list) curl_free(encoded_object); } - response = send_request("GET", container, NULL, xmlctx, NULL); + if ((!strcmp(path, "") || !strcmp(path, "/")) && *override_storage_url) + response = 404; + else + response = send_request("GET", container, NULL, xmlctx, NULL); + if (response >= 200 && response < 300) xmlParseChunk(xmlctx, "", 0, 1); if (response >= 200 && response < 300 && xmlctx->wellFormed ) @@ -579,7 +583,7 @@ int cloudfs_list_directory(const char *path, dir_entry **dir_list) } retval = 1; } - else if (override_storage_url[0]){ + else if (*override_storage_url){ entry_count = 1; dir_entry *de = (dir_entry *)malloc(sizeof(dir_entry)); diff --git a/cloudfuse.c b/cloudfuse.c index 422a30a..cd09803 100644 --- a/cloudfuse.c +++ b/cloudfuse.c @@ -549,7 +549,8 @@ int main(int argc, char **argv) override_storage_url = options.storage_url; public_container = options.container; - if (!*options.username || !*options.password) + if (!*options.username || !*options.password || + (!*options.storage_url ^ !*options.container)) { fprintf(stderr, "Unable to determine username and API key.\n\n"); fprintf(stderr, "These can be set either as mount options or in" From f197ff351be8e911cb05f2309bcc4e146a309f73 Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Sun, 12 Jan 2014 16:22:32 -0600 Subject: [PATCH 25/42] errors when public container not visible --- cloudfsapi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 8fefc69..7309e33 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -168,8 +168,6 @@ static int send_request_size(char *method, const char *path, void *fp, } else if (!strcasecmp(method, "PUT") && fp) { - // your zealotry will destroy us all! - //rewind(fp); curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); curl_easy_setopt(curl, CURLOPT_INFILESIZE, file_size); curl_easy_setopt(curl, CURLOPT_READDATA, fp); @@ -583,11 +581,10 @@ int cloudfs_list_directory(const char *path, dir_entry **dir_list) } retval = 1; } - else if (*override_storage_url){ + else if ((!strcmp(path, "") || !strcmp(path, "/")) && *override_storage_url) { entry_count = 1; dir_entry *de = (dir_entry *)malloc(sizeof(dir_entry)); - //de->name = "osdc_public_data"; de->name = strdup(public_container); struct tm last_modified; strptime("1388434648.01238", "%FT%T", &last_modified); From 77b950bf77079650d33152a5e37ab42567f09601 Mon Sep 17 00:00:00 2001 From: amontero Date: Wed, 15 Jan 2014 21:14:13 +0100 Subject: [PATCH 26/42] Add chengelog entry and bump package version. --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index ecf8780..78c036a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +cloudfuse (0.9-1ubuntu1) precise; urgency=low + + * Imported Upstream version 0.9 + * Remove Debian patches already committed upstream + + -- pataquets Wed, 15 Jan 2014 21:07:18 +0100 + cloudfuse (0.1-1) unstable; urgency=low * Initial release From acbbdc92c2db8ae39f606329e50a4f2cc9a25191 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 16 Jan 2014 18:10:56 -0600 Subject: [PATCH 27/42] put back the retry --- cloudfsapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 7309e33..9c1414f 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -22,7 +22,7 @@ #define RHEL5_LIBCURL_VERSION 462597 #define RHEL5_CERTIFICATE_FILE "/etc/pki/tls/certs/ca-bundle.crt" -#define REQUEST_RETRIES 1 +#define REQUEST_RETRIES 4 // 64 bit time + nanoseconds #define TIME_CHARS 32 From 1328e093e64ae1156db00d48a3ef0e4e600e5085 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 16 Jan 2014 18:13:28 -0600 Subject: [PATCH 28/42] tip to remove segments --- README | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README b/README index 7b36011..6293311 100644 --- a/README +++ b/README @@ -106,10 +106,11 @@ BUGS/SHORTCOMINGS: * Symlinks are objects containing the target with content-type "application/link". * Deleting a DLO does not delete the segments and updating a DLO leaves - the old segments. + the old segments. Until fixed to remove segments : + for i in $(ls -d ${NONSEGMENT_DIR}_segments/*/*/*/*);do rm $i/*; done; + rmdir ${NONSEGMENT_DIR}_segments * Initial file size of DLOs is 0 because the bytes field when listing a container is 0 for DLOs. After opening the file the size if correct. - * You can't view containers from other tenants. AWESOME CONTRIBUTORS: @@ -131,3 +132,4 @@ Michael Barton For info specific to this fork contact Matt Greenway + From 9c8a0a1ac9bf4cec4f71b770fdf1f8597d43e52a Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Wed, 22 Jan 2014 14:48:04 -0600 Subject: [PATCH 29/42] factored out the threads for segments and verified --- cloudfsapi.c | 88 ++++++++++++++++++++++++++++++++++------------------ cloudfsapi.h | 1 + 2 files changed, 58 insertions(+), 31 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 9c1414f..f467011 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -97,7 +97,8 @@ static void add_header(curl_slist **headers, const char *name, *headers = curl_slist_append(*headers, x_header); } -static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) +static size_t rw_callback(size_t (*rw)(void*, size_t, size_t, FILE*), void *ptr, + size_t size, size_t nmemb, void *userp) { struct segment_info *info = (struct segment_info *)userp; size_t mem = size * nmemb; @@ -105,13 +106,29 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) if (mem < 1 || info->size < 1) return 0; - size_t amt_read = fread(ptr, 1, info->size < mem ? info->size : mem, info->fp); + size_t amt_read = rw(ptr, 1, info->size < mem ? info->size : mem, info->fp); info->size -= amt_read; return amt_read; } -static int send_request_size(char *method, const char *path, void *fp, +size_t fwrite2(void *ptr, size_t size, size_t nmemb, FILE *filep) +{ + return fwrite((const void*)ptr, size, nmemb, filep); +} + +static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) +{ + return rw_callback(fread, ptr, size, nmemb, userp); +} + +static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *userp) +{ + return rw_callback(fwrite2, ptr, size, nmemb, userp); +} + + +static int send_request_size(const char *method, const char *path, void *fp, xmlParserCtxtPtr xmlctx, curl_slist *extra_headers, off_t file_size, int is_segment) { @@ -298,7 +315,8 @@ void *upload_segment(void *seginfo) snprintf(seg_path, MAX_URL_SIZE, "%s%08i", info->seg_base, info->part); char *encoded = curl_escape(seg_path, 0); - int response = send_request_size("PUT", encoded, info, NULL, NULL, + + int response = send_request_size(info->method, encoded, info, NULL, NULL, info->size, 1); if (!(response >= 200 && response < 300)) @@ -310,6 +328,39 @@ void *upload_segment(void *seginfo) pthread_exit(NULL); } +void run_segment_threads(const char *method, int segments, int full_segments, int remaining, + FILE *fp, char *seg_base) +{ + char file_path[PATH_MAX] = ""; + struct segment_info *info = (struct segment_info *) + malloc(segments * sizeof(struct segment_info)); + + pthread_t *threads = (pthread_t *)malloc(segments * sizeof(pthread_t)); +#ifdef __linux__ + snprintf(file_path, PATH_MAX, "/proc/self/fd/%d", fileno(fp)); +#else + //TODO: I haven't actually tested this + if (fcntl(fileno(fp), F_GETPATH, file_path) == -1) + fprintf(stderr, "couldn't get the path name\n"); +#endif + + int i; + for (i = 0; i < segments; i++) { + info[i].method = method; + info[i].fp = fopen(file_path, "r"); + info[i].part = i; + info[i].size = i < full_segments ? segment_size : remaining; + info[i].seg_base = seg_base; + pthread_create(&threads[i], NULL, upload_segment, (void *)&(info[i])); + } + + for (i = 0; i < segments; i++) { + pthread_join(threads[i], NULL); + } + free(info); + free(threads); +} + int cloudfs_object_read_fp(const char *path, FILE *fp) { @@ -339,7 +390,6 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) snprintf(meta_mtime, TIME_CHARS, "%f", atof(string_float)); char seg_base[MAX_URL_SIZE] = ""; - char file_path[PATH_MAX] = ""; int response; char *string = strdup(path); @@ -376,33 +426,9 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) free(string); - struct segment_info *info = (struct segment_info *) - malloc(segments * sizeof(struct segment_info)); + const char *put = "PUT"; - pthread_t *threads = (pthread_t *)malloc(segments * sizeof(pthread_t)); - -#ifdef __linux__ - snprintf(file_path, PATH_MAX, "/proc/self/fd/%d", fileno(fp)); -#else - //TODO: I haven't actually tested this - if (fcntl(fileno(fp), F_GETPATH, file_path) == -1) - fprintf(stderr, "couldn't get the path name\n"); -#endif - - for (i = 0; i < segments; i++) { - info[i].fp = fopen(file_path, "r"); - info[i].part = i; - info[i].size = i < full_segments ? segment_size : remaining; - info[i].seg_base = seg_base; - pthread_create(&threads[i], NULL, upload_segment, (void *)&(info[i])); - } - - for (i = 0; i < segments; i++) { - pthread_join(threads[i], NULL); - } - - free(info); - free(threads); + run_segment_threads(put, segments, full_segments, remaining, fp, seg_base); char *encoded = curl_escape(path, 0); curl_slist *headers = NULL; diff --git a/cloudfsapi.h b/cloudfsapi.h index f9e5047..9289a69 100644 --- a/cloudfsapi.h +++ b/cloudfsapi.h @@ -30,6 +30,7 @@ struct segment_info int part; long size; char *seg_base; + const char *method; }; long segment_size; From 3d9c95ddae2f7f50682e5f5ddd3438e91d8640e2 Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Wed, 22 Jan 2014 19:59:08 -0600 Subject: [PATCH 30/42] threaded segment download ready for testing --- cloudfsapi.c | 162 +++++++++++++++++++++++++++++++++++++++------------ cloudfsapi.h | 1 + 2 files changed, 127 insertions(+), 36 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index f467011..6520ed4 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -193,7 +193,12 @@ static int send_request_size(const char *method, const char *path, void *fp, } else if (!strcasecmp(method, "GET")) { - if (fp) + if (is_segment) + { + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp); + } + else if (fp) { rewind(fp); // make sure the file is ready for a-writin' fflush(fp); @@ -311,7 +316,7 @@ void *upload_segment(void *seginfo) struct segment_info *info; info = (struct segment_info *)seginfo; - fseek(info->fp, info->part * segment_size, SEEK_SET); + fseek(info->fp, info->part * info->segment_size, SEEK_SET); snprintf(seg_path, MAX_URL_SIZE, "%s%08i", info->seg_base, info->part); char *encoded = curl_escape(seg_path, 0); @@ -324,12 +329,14 @@ void *upload_segment(void *seginfo) response); curl_free(encoded); + fflush(info->fp); fclose(info->fp); pthread_exit(NULL); } +// segment_size is the globabl config variable and size_of_segment is local void run_segment_threads(const char *method, int segments, int full_segments, int remaining, - FILE *fp, char *seg_base) + FILE *fp, char *seg_base, int size_of_segments) { char file_path[PATH_MAX] = ""; struct segment_info *info = (struct segment_info *) @@ -347,9 +354,10 @@ void run_segment_threads(const char *method, int segments, int full_segments, in int i; for (i = 0; i < segments; i++) { info[i].method = method; - info[i].fp = fopen(file_path, "r"); + info[i].fp = fopen(file_path, method[0] == 'G' ? "r+" : "r"); info[i].part = i; - info[i].size = i < full_segments ? segment_size : remaining; + info[i].segment_size = size_of_segments; + info[i].size = i < full_segments ? size_of_segments : remaining; info[i].seg_base = seg_base; pthread_create(&threads[i], NULL, upload_segment, (void *)&(info[i])); } @@ -361,6 +369,32 @@ void run_segment_threads(const char *method, int segments, int full_segments, in free(threads); } +void split_path(const char *path, char *seg_base, char *container, + char *object) +{ + char *string = strdup(path); + + snprintf(seg_base, MAX_URL_SIZE, "%s", strsep(&string, "/")); + + strncat(container, strsep(&string, "/"), + MAX_URL_SIZE - strnlen(container, MAX_URL_SIZE)); + + char *_object = strsep(&string, "/"); + + char *remstr; + + while (remstr = strsep(&string, "/")) { + strncat(container, "/", + MAX_URL_SIZE - strnlen(container, MAX_URL_SIZE)); + strncat(container, _object, + MAX_URL_SIZE - strnlen(container, MAX_URL_SIZE)); + _object = remstr; + } + + strncpy(object, _object, MAX_URL_SIZE); + free(string); +} + int cloudfs_object_read_fp(const char *path, FILE *fp) { @@ -376,8 +410,6 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) int full_segments = flen / segment_size; int segments = full_segments + (remaining > 0); - char manifest[MAX_URL_SIZE]; - // The best we can do here is to get the current time that way tools that // use the mtime can at least check if the file was changing after now struct timespec now; @@ -390,52 +422,36 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) snprintf(meta_mtime, TIME_CHARS, "%f", atof(string_float)); char seg_base[MAX_URL_SIZE] = ""; - int response; - - char *string = strdup(path); - - snprintf(seg_base, MAX_URL_SIZE, "%s", strsep(&string, "/")); char container[MAX_URL_SIZE] = ""; + char object[MAX_URL_SIZE] = ""; - strncat(container, strsep(&string, "/"), - MAX_URL_SIZE - strnlen(container, MAX_URL_SIZE)); + split_path(path, seg_base, container, object); - char *object = strsep(&string, "/"); - - char *remstr; - - while (remstr = strsep(&string, "/")) { - strncat(container, "/", - MAX_URL_SIZE - strnlen(container, MAX_URL_SIZE)); - strncat(container, object, - MAX_URL_SIZE - strnlen(container, MAX_URL_SIZE)); - object = remstr; - } - - // create the segments container + char manifest[MAX_URL_SIZE]; snprintf(manifest, MAX_URL_SIZE, "%s_segments", container); + // create the segments container cloudfs_create_directory(manifest); // reusing manifest - snprintf(manifest, MAX_URL_SIZE, "%s_segments/%s/%s/%ld/%ld/", container, - object, meta_mtime, flen, segment_size); + snprintf(manifest, MAX_URL_SIZE, "%s_segments/%s/%s/%ld/%ld/", + container, object, meta_mtime, flen, segment_size); - snprintf(seg_base, MAX_URL_SIZE, "%s/%s", seg_base, manifest); + char tmp[MAX_URL_SIZE]; + strncpy(tmp, seg_base, MAX_URL_SIZE); + snprintf(seg_base, MAX_URL_SIZE, "%s/%s", tmp, manifest); - free(string); - - const char *put = "PUT"; - - run_segment_threads(put, segments, full_segments, remaining, fp, seg_base); + run_segment_threads("PUT", segments, full_segments, remaining, fp, + seg_base, segment_size); char *encoded = curl_escape(path, 0); curl_slist *headers = NULL; add_header(&headers, "x-object-manifest", manifest); add_header(&headers, "x-object-meta-mtime", meta_mtime); add_header(&headers, "Content-Length", "0"); - response = send_request_size("PUT", encoded, NULL, NULL, headers, 0, 0); + + int response = send_request_size("PUT", encoded, NULL, NULL, headers, 0, 0); curl_slist_free_all(headers); curl_free(encoded); @@ -450,9 +466,83 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) return (response >= 200 && response < 300); } +int is_segmented(const char *seg_path, const char *object) +{ + return 0; + dir_entry *seg_dir; + if (cloudfs_list_directory(seg_path, &seg_dir)) { + if (seg_dir->isdir) { + do { + if (!strncmp(seg_dir->name, object, MAX_URL_SIZE)) { + return 1; + } + } while ((seg_dir = seg_dir->next)); + } + } + return 0; +} + int cloudfs_object_write_fp(const char *path, FILE *fp) { char *encoded = curl_escape(path, 0); + char seg_base[MAX_URL_SIZE] = ""; + + char container[MAX_URL_SIZE] = ""; + char object[MAX_URL_SIZE] = ""; + + split_path(path, seg_base, container, object); + + char seg_path[MAX_URL_SIZE]; + snprintf(seg_path, MAX_URL_SIZE, "%s/%s_segments", seg_base, container); + + if (is_segmented(seg_path, object)) { + char manifest[MAX_URL_SIZE]; + dir_entry *seg_dir; + + snprintf(manifest, MAX_URL_SIZE, "%s/%s", seg_path, object); + cloudfs_list_directory(manifest, &seg_dir); + + // snprintf seesaw between manifest and seg_path to get + // the total_size and the segment size as well as the actual objects + char *timestamp = seg_dir->name; + snprintf(seg_path, MAX_URL_SIZE, "%s/%s", manifest, timestamp); + cloudfs_list_directory(seg_path, &seg_dir); + + char *str_size = seg_dir->name; + snprintf(manifest, MAX_URL_SIZE, "%s/%s", seg_path, str_size); + cloudfs_list_directory(manifest, &seg_dir); + + char *str_segment = seg_dir->name; + snprintf(seg_path, MAX_URL_SIZE, "%s/%s", manifest, str_segment); + cloudfs_list_directory(seg_path, &seg_dir); + + long total_size = strtoll(str_size, NULL, 10); + long size_of_segments = strtoll(str_segment, NULL, 10); + + long remaining = total_size % size_of_segments; + long full_segments = total_size / size_of_segments; + long segments = full_segments + (remaining > 0); + + snprintf(manifest, MAX_URL_SIZE, "%s_segments/%s/%s/%s/%s/", + container, object, timestamp, str_size, str_segment); + + char tmp[MAX_URL_SIZE]; + strncpy(tmp, seg_base, MAX_URL_SIZE); + snprintf(seg_base, MAX_URL_SIZE, "%s/%s", tmp, manifest); + + rewind(fp); + fflush(fp); + if (ftruncate(fileno(fp), 0) < 0) + { + debugf("ftruncate failed. I don't know what to do about that."); + abort(); + } + + run_segment_threads("GET", segments, full_segments, remaining, fp, + seg_base, size_of_segments); + return 1; + } + int response = send_request("GET", encoded, fp, NULL, NULL); curl_free(encoded); fflush(fp); diff --git a/cloudfsapi.h b/cloudfsapi.h index 9289a69..923fcd3 100644 --- a/cloudfsapi.h +++ b/cloudfsapi.h @@ -29,6 +29,7 @@ struct segment_info FILE *fp; int part; long size; + long segment_size; char *seg_base; const char *method; }; From 7b6597c872a14d4d0ecb5ff0b5a1e0c39be15119 Mon Sep 17 00:00:00 2001 From: Allison Heath Date: Wed, 22 Jan 2014 20:02:12 -0600 Subject: [PATCH 31/42] returned 0 removed --- cloudfsapi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 6520ed4..38c4d9f 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -468,7 +468,6 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) int is_segmented(const char *seg_path, const char *object) { - return 0; dir_entry *seg_dir; if (cloudfs_list_directory(seg_path, &seg_dir)) { if (seg_dir->isdir) { From ce33d4b5b4025f34188134819107252821153f15 Mon Sep 17 00:00:00 2001 From: Matt Greenway Date: Thu, 23 Jan 2014 18:36:38 -0600 Subject: [PATCH 32/42] keep tmep files --- cloudfsapi.c | 5 ++++- cloudfuse.c | 26 +++++++++++++++++++++++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 38c4d9f..92ac605 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -468,9 +468,10 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) int is_segmented(const char *seg_path, const char *object) { + //return 0; dir_entry *seg_dir; if (cloudfs_list_directory(seg_path, &seg_dir)) { - if (seg_dir->isdir) { + if (seg_dir && seg_dir->isdir) { do { if (!strncmp(seg_dir->name, object, MAX_URL_SIZE)) { return 1; @@ -537,6 +538,8 @@ int cloudfs_object_write_fp(const char *path, FILE *fp) abort(); } + fprintf(stderr, "\n\nTHE SEGMENTS%s\n\n", seg_base); + run_segment_threads("GET", segments, full_segments, remaining, fp, seg_base, size_of_segments); return 1; diff --git a/cloudfuse.c b/cloudfuse.c index cd09803..dad387b 100644 --- a/cloudfuse.c +++ b/cloudfuse.c @@ -291,10 +291,29 @@ static int cfs_create(const char *path, mode_t mode, struct fuse_file_info *info static int cfs_open(const char *path, struct fuse_file_info *info) { - FILE *temp_file = tmpfile(); + //FILE *temp_file = tmpfile(); + FILE *temp_file;// = fopen(file_path, "w+b"); + + char tmp_path[PATH_MAX]; + strncpy(tmp_path, path, PATH_MAX); + + char *pch; + while((pch = strchr(tmp_path, '/'))) { + *pch = '.'; + } + + char file_path[PATH_MAX]; + snprintf(file_path, PATH_MAX, "/tmp/%s", tmp_path); + dir_entry *de = path_info(path); - if (!(info->flags & O_WRONLY)) - { + + if( access(file_path, F_OK) != -1 ) { + temp_file = fopen(file_path, "r"); + update_dir_cache(path, (de ? de->size : 0), 0, 0); + // file exists + } else if (!(info->flags & O_WRONLY)) { + //temp_file = tmpfile(); + temp_file = fopen(file_path, "w+b"); if (!cloudfs_object_write_fp(path, temp_file)) { fclose(temp_file); @@ -302,6 +321,7 @@ static int cfs_open(const char *path, struct fuse_file_info *info) } update_dir_cache(path, (de ? de->size : 0), 0, 0); } + openfile *of = (openfile *)malloc(sizeof(openfile)); of->fd = dup(fileno(temp_file)); fclose(temp_file); From 072398be78b6adf3b02b0e68ca76cc58ebfadf80 Mon Sep 17 00:00:00 2001 From: Matt Greenway Date: Fri, 24 Jan 2014 10:56:06 -0600 Subject: [PATCH 33/42] configure temp path not tested --- cloudfuse.c | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/cloudfuse.c b/cloudfuse.c index dad387b..a4a7ff1 100644 --- a/cloudfuse.c +++ b/cloudfuse.c @@ -21,6 +21,7 @@ #define OPTION_SIZE 1024 static int cache_timeout; +static char *temp_dir; typedef struct dir_cache { @@ -303,16 +304,35 @@ static int cfs_open(const char *path, struct fuse_file_info *info) } char file_path[PATH_MAX]; - snprintf(file_path, PATH_MAX, "/tmp/%s", tmp_path); + snprintf(file_path, PATH_MAX, "%s/.cloudfuse%ld-%s", temp_dir, + (long)getpid(), tmp_path); dir_entry *de = path_info(path); - if( access(file_path, F_OK) != -1 ) { + if(access(file_path, F_OK) != -1) { temp_file = fopen(file_path, "r"); update_dir_cache(path, (de ? de->size : 0), 0, 0); // file exists } else if (!(info->flags & O_WRONLY)) { + // we need to lock on the filename another process could open the file + // while we are writing to it and then only read part of the file + + // duplicate the directory caching datastructure to make the code easier + // to understand. + + // each file in the cache needs: + // filename, is_writing, last_closed, is_removing + // the first time a file is opened a new entry is created in the cache + // setting the filename and is_writing to true. This check needs to be + // wrapped with a lock. + // + // each time a file is closed we set the last_closed for the file to now + // and we check the cache for files whose last + // closed is greater than cache_timeout, then start a new thread rming + // that file. + //temp_file = tmpfile(); + temp_file = fopen(file_path, "w+b"); if (!cloudfs_object_write_fp(path, temp_file)) { @@ -509,6 +529,7 @@ static struct options { char segment_above[OPTION_SIZE]; char storage_url[OPTION_SIZE]; char container[OPTION_SIZE]; + char temp_dir[OPTION_SIZE]; } options = { .username = "", .password = "", @@ -522,6 +543,7 @@ static struct options { .segment_above = "2147483648", .storage_url = "", .container = "", + .temp_dir = "/tmp/", }; int parse_option(void *data, const char *arg, int key, struct fuse_args *outargs) @@ -538,7 +560,8 @@ int parse_option(void *data, const char *arg, int key, struct fuse_args *outargs sscanf(arg, " segment_above = %[^\r\n ]", options.segment_above) || sscanf(arg, " segment_size = %[^\r\n ]", options.segment_size) || sscanf(arg, " storage_url = %[^\r\n ]", options.storage_url) || - sscanf(arg, " container = %[^\r\n ]", options.container)) + sscanf(arg, " container = %[^\r\n ]", options.container) || + sscanf(arg, " temp_dir = %[^\r\n ]", options.temp_dir)) return 0; if (!strcmp(arg, "-f") || !strcmp(arg, "-d") || !strcmp(arg, "debug")) cloudfs_debug(1); @@ -566,8 +589,11 @@ int main(int argc, char **argv) segment_size = atoll(options.segment_size); segment_above = atoll(options.segment_above); + + // this is ok since main is on the stack during the entire execution override_storage_url = options.storage_url; public_container = options.container; + temp_dir = options.temp_dir; if (!*options.username || !*options.password || (!*options.storage_url ^ !*options.container)) @@ -588,6 +614,7 @@ int main(int argc, char **argv) fprintf(stderr, " segment_above=[File size at which to use segments, defult 2147483648]\n"); fprintf(stderr, " storage_url=[Storage URL for other tenant to view container]\n"); fprintf(stderr, " container=[Public container to view of tenant specified by storage_url]\n"); + fprintf(stderr, " temp_dir=[Directory to store temp files]\n"); return 1; } From 0d30284b1af75d7491a6ced1bfe9ce3b0ea8c9ef Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Fri, 24 Jan 2014 18:55:22 -0600 Subject: [PATCH 34/42] from 14 to 130MB/s --- cloudfsapi.c | 25 +++++++++++++++++++++++-- cloudfuse.c | 4 ++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 92ac605..78a814e 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -27,6 +27,9 @@ // 64 bit time + nanoseconds #define TIME_CHARS 32 +// size of buffer for writing to disk look at ioblksize.h in coreutils +// and try some values on your own system if you want the best performance +#define DISK_BUFF_SIZE 32768 static char storage_url[MAX_URL_SIZE]; static char storage_token[MAX_HEADER_SIZE]; @@ -97,6 +100,21 @@ static void add_header(curl_slist **headers, const char *name, *headers = curl_slist_append(*headers, x_header); } +static size_t rw_callback2(ssize_t (*rw)(int, const void *, size_t), void *ptr, + size_t size, size_t nmemb, void *userp) +{ + struct segment_info *info = (struct segment_info *)userp; + size_t mem = size * nmemb; + + if (mem < 1 || info->size < 1) + return 0; + + size_t amt_read = rw(fileno(info->fp), ptr, info->size < mem ? info->size : mem); + info->size -= amt_read; + + return amt_read; +} + static size_t rw_callback(size_t (*rw)(void*, size_t, size_t, FILE*), void *ptr, size_t size, size_t nmemb, void *userp) { @@ -127,6 +145,10 @@ static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *userp) return rw_callback(fwrite2, ptr, size, nmemb, userp); } +static size_t write_callback2(void *ptr, size_t size, size_t nmemb, void *userp) +{ + return rw_callback2(write, ptr, size, nmemb, userp); +} static int send_request_size(const char *method, const char *path, void *fp, xmlParserCtxtPtr xmlctx, curl_slist *extra_headers, @@ -317,6 +339,7 @@ void *upload_segment(void *seginfo) info = (struct segment_info *)seginfo; fseek(info->fp, info->part * info->segment_size, SEEK_SET); + setvbuf(info->fp, NULL, _IOFBF, DISK_BUFF_SIZE); snprintf(seg_path, MAX_URL_SIZE, "%s%08i", info->seg_base, info->part); char *encoded = curl_escape(seg_path, 0); @@ -538,8 +561,6 @@ int cloudfs_object_write_fp(const char *path, FILE *fp) abort(); } - fprintf(stderr, "\n\nTHE SEGMENTS%s\n\n", seg_base); - run_segment_threads("GET", segments, full_segments, remaining, fp, seg_base, size_of_segments); return 1; diff --git a/cloudfuse.c b/cloudfuse.c index a4a7ff1..0ab6d78 100644 --- a/cloudfuse.c +++ b/cloudfuse.c @@ -331,9 +331,9 @@ static int cfs_open(const char *path, struct fuse_file_info *info) // closed is greater than cache_timeout, then start a new thread rming // that file. - //temp_file = tmpfile(); + temp_file = tmpfile(); - temp_file = fopen(file_path, "w+b"); + //temp_file = fopen(file_path, "w+b"); if (!cloudfs_object_write_fp(path, temp_file)) { fclose(temp_file); From 64ba391f1effabdd52af2f0c8a5dbc2dfb95d128 Mon Sep 17 00:00:00 2001 From: Matt Greenway Date: Sat, 25 Jan 2014 22:19:52 -0600 Subject: [PATCH 35/42] w/out temp_dir uses tmpfile() --- cloudfuse.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cloudfuse.c b/cloudfuse.c index 0ab6d78..0e61047 100644 --- a/cloudfuse.c +++ b/cloudfuse.c @@ -292,7 +292,6 @@ static int cfs_create(const char *path, mode_t mode, struct fuse_file_info *info static int cfs_open(const char *path, struct fuse_file_info *info) { - //FILE *temp_file = tmpfile(); FILE *temp_file;// = fopen(file_path, "w+b"); char tmp_path[PATH_MAX]; @@ -331,9 +330,13 @@ static int cfs_open(const char *path, struct fuse_file_info *info) // closed is greater than cache_timeout, then start a new thread rming // that file. - temp_file = tmpfile(); + // TODO: just to prevent this craziness for now + if (*temp_dir) + temp_file = fopen(file_path, "w+b"); + else + temp_file = tmpfile(); + - //temp_file = fopen(file_path, "w+b"); if (!cloudfs_object_write_fp(path, temp_file)) { fclose(temp_file); @@ -543,7 +546,8 @@ static struct options { .segment_above = "2147483648", .storage_url = "", .container = "", - .temp_dir = "/tmp/", + //.temp_dir = "/tmp/", + .temp_dir = "", }; int parse_option(void *data, const char *arg, int key, struct fuse_args *outargs) From c5e96ad1c8fac6a5943c25cd6f21e90e1cae740b Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Sun, 26 Jan 2014 15:34:45 -0600 Subject: [PATCH 36/42] rearanging functions --- cloudfsapi.c | 97 +++++++++++++++++++++------------------------------- 1 file changed, 39 insertions(+), 58 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 78a814e..bef168c 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -100,21 +100,6 @@ static void add_header(curl_slist **headers, const char *name, *headers = curl_slist_append(*headers, x_header); } -static size_t rw_callback2(ssize_t (*rw)(int, const void *, size_t), void *ptr, - size_t size, size_t nmemb, void *userp) -{ - struct segment_info *info = (struct segment_info *)userp; - size_t mem = size * nmemb; - - if (mem < 1 || info->size < 1) - return 0; - - size_t amt_read = rw(fileno(info->fp), ptr, info->size < mem ? info->size : mem); - info->size -= amt_read; - - return amt_read; -} - static size_t rw_callback(size_t (*rw)(void*, size_t, size_t, FILE*), void *ptr, size_t size, size_t nmemb, void *userp) { @@ -145,11 +130,6 @@ static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *userp) return rw_callback(fwrite2, ptr, size, nmemb, userp); } -static size_t write_callback2(void *ptr, size_t size, size_t nmemb, void *userp) -{ - return rw_callback2(write, ptr, size, nmemb, userp); -} - static int send_request_size(const char *method, const char *path, void *fp, xmlParserCtxtPtr xmlctx, curl_slist *extra_headers, off_t file_size, int is_segment) @@ -294,44 +274,6 @@ static size_t header_dispatch(void *ptr, size_t size, size_t nmemb, void *stream return size * nmemb; } -/* - * Public interface - */ - -void cloudfs_init() -{ - LIBXML_TEST_VERSION - xmlXPathInit(); - curl_global_init(CURL_GLOBAL_ALL); - pthread_mutex_init(&pool_mut, NULL); - curl_version_info_data *cvid = curl_version_info(CURLVERSION_NOW); - - // CentOS/RHEL 5 get stupid mode, because they have a broken libcurl - if (cvid->version_num == RHEL5_LIBCURL_VERSION) - { - debugf("RHEL5 mode enabled."); - rhel5_mode = 1; - } - - if (!strncasecmp(cvid->ssl_version, "openssl", 7)) - { - #ifdef HAVE_OPENSSL - int i; - ssl_lockarray = (pthread_mutex_t *)OPENSSL_malloc(CRYPTO_num_locks() * - sizeof(pthread_mutex_t)); - for (i = 0; i < CRYPTO_num_locks(); i++) - pthread_mutex_init(&(ssl_lockarray[i]), NULL); - CRYPTO_set_id_callback((unsigned long (*)())thread_id); - CRYPTO_set_locking_callback((void (*)())lock_callback); - #endif - } - else if (!strncasecmp(cvid->ssl_version, "nss", 3)) - { - // allow https to continue working after forking (for RHEL/CentOS 6) - setenv("NSS_STRICT_NOFORK", "DISABLED", 1); - } -} - void *upload_segment(void *seginfo) { char seg_path[MAX_URL_SIZE]; @@ -358,6 +300,7 @@ void *upload_segment(void *seginfo) } // segment_size is the globabl config variable and size_of_segment is local +//TODO: return whether the upload/download failed or not void run_segment_threads(const char *method, int segments, int full_segments, int remaining, FILE *fp, char *seg_base, int size_of_segments) { @@ -418,6 +361,44 @@ void split_path(const char *path, char *seg_base, char *container, free(string); } +/* + * Public interface + */ + +void cloudfs_init() +{ + LIBXML_TEST_VERSION + xmlXPathInit(); + curl_global_init(CURL_GLOBAL_ALL); + pthread_mutex_init(&pool_mut, NULL); + curl_version_info_data *cvid = curl_version_info(CURLVERSION_NOW); + + // CentOS/RHEL 5 get stupid mode, because they have a broken libcurl + if (cvid->version_num == RHEL5_LIBCURL_VERSION) + { + debugf("RHEL5 mode enabled."); + rhel5_mode = 1; + } + + if (!strncasecmp(cvid->ssl_version, "openssl", 7)) + { + #ifdef HAVE_OPENSSL + int i; + ssl_lockarray = (pthread_mutex_t *)OPENSSL_malloc(CRYPTO_num_locks() * + sizeof(pthread_mutex_t)); + for (i = 0; i < CRYPTO_num_locks(); i++) + pthread_mutex_init(&(ssl_lockarray[i]), NULL); + CRYPTO_set_id_callback((unsigned long (*)())thread_id); + CRYPTO_set_locking_callback((void (*)())lock_callback); + #endif + } + else if (!strncasecmp(cvid->ssl_version, "nss", 3)) + { + // allow https to continue working after forking (for RHEL/CentOS 6) + setenv("NSS_STRICT_NOFORK", "DISABLED", 1); + } +} + int cloudfs_object_read_fp(const char *path, FILE *fp) { From c0f9a02d5fd92a476aa641f1a571fdfd4c1d66e7 Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Sun, 26 Jan 2014 16:25:32 -0600 Subject: [PATCH 37/42] symlinks work again, needed to fflush for proper size --- cloudfsapi.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index bef168c..05e42d2 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -248,8 +248,11 @@ static int send_request(char *method, const char *path, FILE *fp, { long flen = 0; - if (fp) - flen = cloudfs_file_size(fileno(fp)); + if (fp) { + // if we don't flush the size will probably be zero + fflush(fp); + flen = cloudfs_file_size(fileno(fp)); + } return send_request_size(method, path, fp, xmlctx, extra_headers, flen, 0); @@ -766,7 +769,8 @@ int cloudfs_create_symlink(const char *src, const char *dst) char *dst_encoded = curl_escape(dst, 0); FILE *lnk = tmpfile(); - fwrite(src, strlen(src), 1, lnk); + + fwrite(src, 1, strlen(src), lnk); fwrite("\0", 1, 1, lnk); int response = send_request("MKLINK", dst_encoded, lnk, NULL, NULL); curl_free(dst_encoded); From c81e644bedae1a9595114686542c56853a37b101 Mon Sep 17 00:00:00 2001 From: Matt Greenway Date: Wed, 5 Feb 2014 22:54:02 -0600 Subject: [PATCH 38/42] removed unnecessary flush --- cloudfsapi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index 05e42d2..e4bf65b 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -297,7 +297,6 @@ void *upload_segment(void *seginfo) response); curl_free(encoded); - fflush(info->fp); fclose(info->fp); pthread_exit(NULL); } From f4bce3d594b32e1fb0fd8a8999a234c3e6b817f2 Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Fri, 21 Feb 2014 11:49:11 -0600 Subject: [PATCH 39/42] fixed segfault bug due to incorrectly handling persistent tempfiles --- cloudfuse.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/cloudfuse.c b/cloudfuse.c index 0e61047..bc87081 100644 --- a/cloudfuse.c +++ b/cloudfuse.c @@ -292,19 +292,43 @@ static int cfs_create(const char *path, mode_t mode, struct fuse_file_info *info static int cfs_open(const char *path, struct fuse_file_info *info) { - FILE *temp_file;// = fopen(file_path, "w+b"); + //TODO: need to clean this up and reduce the duplicated code + if (!*temp_dir) { + + FILE *temp_file = tmpfile(); + dir_entry *de = path_info(path); + if (!(info->flags & O_WRONLY)) + { + if (!cloudfs_object_write_fp(path, temp_file)) + { + fclose(temp_file); + return -ENOENT; + } + update_dir_cache(path, (de ? de->size : 0), 0, 0); + } + openfile *of = (openfile *)malloc(sizeof(openfile)); + of->fd = dup(fileno(temp_file)); + fclose(temp_file); + of->flags = info->flags; + info->fh = (uintptr_t)of; + info->direct_io = 1; + return 0; + } + + + FILE *temp_file; char tmp_path[PATH_MAX]; strncpy(tmp_path, path, PATH_MAX); char *pch; while((pch = strchr(tmp_path, '/'))) { - *pch = '.'; + *pch = '.'; } char file_path[PATH_MAX]; snprintf(file_path, PATH_MAX, "%s/.cloudfuse%ld-%s", temp_dir, - (long)getpid(), tmp_path); + (long)getpid(), tmp_path); dir_entry *de = path_info(path); From c6bd28389a402f9c5279eafbc8bcca1e84ba80b0 Mon Sep 17 00:00:00 2001 From: mtgreenway Date: Sun, 23 Feb 2014 21:55:31 -0600 Subject: [PATCH 40/42] rm on segments --- cloudfsapi.c | 181 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 125 insertions(+), 56 deletions(-) diff --git a/cloudfsapi.c b/cloudfsapi.c index e4bf65b..c899ede 100644 --- a/cloudfsapi.c +++ b/cloudfsapi.c @@ -363,6 +363,95 @@ void split_path(const char *path, char *seg_base, char *container, free(string); } +int internal_is_segmented(const char *seg_path, const char *object) +{ + dir_entry *seg_dir; + if (cloudfs_list_directory(seg_path, &seg_dir)) { + if (seg_dir && seg_dir->isdir) { + do { + if (!strncmp(seg_dir->name, object, MAX_URL_SIZE)) { + return 1; + } + } while ((seg_dir = seg_dir->next)); + } + } + return 0; +} + +int is_segmented(const char *path) +{ + char container[MAX_URL_SIZE] = ""; + char object[MAX_URL_SIZE] = ""; + char seg_base[MAX_URL_SIZE] = ""; + + split_path(path, seg_base, container, object); + + char seg_path[MAX_URL_SIZE]; + snprintf(seg_path, MAX_URL_SIZE, "%s/%s_segments", seg_base, container); + + return internal_is_segmented(seg_path, object); +} + + +int format_segments(const char *path, char * seg_base, long *segments, + long *full_segments, long *remaining, long *size_of_segments) +{ + + char container[MAX_URL_SIZE] = ""; + char object[MAX_URL_SIZE] = ""; + + split_path(path, seg_base, container, object); + + char seg_path[MAX_URL_SIZE]; + snprintf(seg_path, MAX_URL_SIZE, "%s/%s_segments", seg_base, container); + + if (internal_is_segmented(seg_path, object)) { + char manifest[MAX_URL_SIZE]; + dir_entry *seg_dir; + + snprintf(manifest, MAX_URL_SIZE, "%s/%s", seg_path, object); + if (!cloudfs_list_directory(manifest, &seg_dir)) + return 0; + + // snprintf seesaw between manifest and seg_path to get + // the total_size and the segment size as well as the actual objects + char *timestamp = seg_dir->name; + snprintf(seg_path, MAX_URL_SIZE, "%s/%s", manifest, timestamp); + if (!cloudfs_list_directory(seg_path, &seg_dir)) + return 0; + + char *str_size = seg_dir->name; + snprintf(manifest, MAX_URL_SIZE, "%s/%s", seg_path, str_size); + if (!cloudfs_list_directory(manifest, &seg_dir)) + return 0; + + char *str_segment = seg_dir->name; + snprintf(seg_path, MAX_URL_SIZE, "%s/%s", manifest, str_segment); + if (!cloudfs_list_directory(seg_path, &seg_dir)) + return 0; + + long total_size = strtoll(str_size, NULL, 10); + *size_of_segments = strtoll(str_segment, NULL, 10); + + *remaining = total_size % *size_of_segments; + *full_segments = total_size / *size_of_segments; + *segments = *full_segments + (*remaining > 0); + + snprintf(manifest, MAX_URL_SIZE, "%s_segments/%s/%s/%s/%s/", + container, object, timestamp, str_size, str_segment); + + char tmp[MAX_URL_SIZE]; + strncpy(tmp, seg_base, MAX_URL_SIZE); + snprintf(seg_base, MAX_URL_SIZE, "%s/%s", tmp, manifest); + + return 1; + } + + else { + return 0; + } +} + /* * Public interface */ @@ -410,6 +499,13 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) // determine the size of the file and segment if it is above the threshhold fseek(fp, 0, SEEK_END); flen = ftell(fp); + + // delete the previously uploaded segments + if (is_segmented(path)) { + if (!cloudfs_delete_object(path)) + debugf("Couldn't delete one of the existing files while uploading."); + } + if (flen >= segment_above) { int i; long remaining = flen % segment_size; @@ -472,72 +568,23 @@ int cloudfs_object_read_fp(const char *path, FILE *fp) return (response >= 200 && response < 300); } -int is_segmented(const char *seg_path, const char *object) -{ - //return 0; - dir_entry *seg_dir; - if (cloudfs_list_directory(seg_path, &seg_dir)) { - if (seg_dir && seg_dir->isdir) { - do { - if (!strncmp(seg_dir->name, object, MAX_URL_SIZE)) { - return 1; - } - } while ((seg_dir = seg_dir->next)); - } - } - return 0; -} int cloudfs_object_write_fp(const char *path, FILE *fp) { char *encoded = curl_escape(path, 0); char seg_base[MAX_URL_SIZE] = ""; - char container[MAX_URL_SIZE] = ""; - char object[MAX_URL_SIZE] = ""; + long segments; + long full_segments; + long remaining; + long size_of_segments; - split_path(path, seg_base, container, object); - - char seg_path[MAX_URL_SIZE]; - snprintf(seg_path, MAX_URL_SIZE, "%s/%s_segments", seg_base, container); - - if (is_segmented(seg_path, object)) { - char manifest[MAX_URL_SIZE]; - dir_entry *seg_dir; - - snprintf(manifest, MAX_URL_SIZE, "%s/%s", seg_path, object); - cloudfs_list_directory(manifest, &seg_dir); - - // snprintf seesaw between manifest and seg_path to get - // the total_size and the segment size as well as the actual objects - char *timestamp = seg_dir->name; - snprintf(seg_path, MAX_URL_SIZE, "%s/%s", manifest, timestamp); - cloudfs_list_directory(seg_path, &seg_dir); - - char *str_size = seg_dir->name; - snprintf(manifest, MAX_URL_SIZE, "%s/%s", seg_path, str_size); - cloudfs_list_directory(manifest, &seg_dir); - - char *str_segment = seg_dir->name; - snprintf(seg_path, MAX_URL_SIZE, "%s/%s", manifest, str_segment); - cloudfs_list_directory(seg_path, &seg_dir); - - long total_size = strtoll(str_size, NULL, 10); - long size_of_segments = strtoll(str_segment, NULL, 10); - - long remaining = total_size % size_of_segments; - long full_segments = total_size / size_of_segments; - long segments = full_segments + (remaining > 0); - - snprintf(manifest, MAX_URL_SIZE, "%s_segments/%s/%s/%s/%s/", - container, object, timestamp, str_size, str_segment); - - char tmp[MAX_URL_SIZE]; - strncpy(tmp, seg_base, MAX_URL_SIZE); - snprintf(seg_base, MAX_URL_SIZE, "%s/%s", tmp, manifest); + if (format_segments(path, seg_base, &segments, &full_segments, &remaining, + &size_of_segments)) { rewind(fp); fflush(fp); + if (ftruncate(fileno(fp), 0) < 0) { debugf("ftruncate failed. I don't know what to do about that."); @@ -745,6 +792,28 @@ void cloudfs_free_dir_list(dir_entry *dir_list) int cloudfs_delete_object(const char *path) { + + char seg_base[MAX_URL_SIZE] = ""; + + long segments; + long full_segments; + long remaining; + long size_of_segments; + + if (format_segments(path, seg_base, &segments, &full_segments, &remaining, + &size_of_segments)) { + int response; + int i; + char seg_path[MAX_URL_SIZE] = ""; + for (i = 0; i < segments; i++) { + snprintf(seg_path, MAX_URL_SIZE, "%s%08i", seg_base, i); + char *encoded = curl_escape(seg_path, 0); + response = send_request("DELETE", encoded, NULL, NULL, NULL); + if (response < 200 || response >= 300) + return 0; + } + } + char *encoded = curl_escape(path, 0); int response = send_request("DELETE", encoded, NULL, NULL, NULL); curl_free(encoded); From 8236786fcd0f6b6acc5e8eed6d974e86ae591494 Mon Sep 17 00:00:00 2001 From: David Beitey Date: Mon, 3 Mar 2014 09:10:54 +1000 Subject: [PATCH 41/42] Expand readme about tenant names & usage requirements --- README | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README b/README index 5e30e17..3b28c25 100644 --- a/README +++ b/README @@ -35,10 +35,20 @@ BUILDING: USE: + You'll need to install fuse to use this application. It may have already + been installed as a dependency if you followed the "BUILDING" instructions + above. + + On Debian: + apt-get install fuse + + On CentOS or similar: + yum install fuse + The following settings can be defined in the file ~/.cloudfuse: username=[Account username for authentication, required] api_key=[API key for authentication with Rackspace] - tenant=[Tenant for authentication with Openstack] + tenant=[Tenant name for authentication with Openstack] password=[Authentication password with Openstack] authurl=[Authentication url, defaults to Rackspace's cloud] region=[Regional endpoint to use] @@ -75,7 +85,8 @@ EXAMPLE: # used to avoid bandwidth charges. # use_snet=true - A typical ~/.cloudfuse configuration file for use with OpenStack: + A typical ~/.cloudfuse configuration file for use with OpenStack, + noting that "tenant" should be the tenant name, rather than the ID: username=demo tenant=demo password=supersecret From 1dc878f1c1f151167a55b255ceab17bf2c751119 Mon Sep 17 00:00:00 2001 From: clayg Date: Wed, 12 Mar 2014 19:11:12 -0700 Subject: [PATCH 42/42] Update README --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 5e30e17..272fbfa 100644 --- a/README +++ b/README @@ -5,7 +5,7 @@ Cloud Files is a remote storage system which is similar in principle to Amazon S3. It provides a simple RESTful interface to storing and retrieving objects. - http://www.rackspacecloud.com/cloud_hosting_products/files + http://www.rackspace.com/cloud/files/ Swift, the software behind Cloud Files, has been open-sourced as part of the OpenStack project.