├── NEWS ├── doc ├── Makefile.am ├── man │ └── s3fs.1 └── Makefile.in ├── test ├── require-root.sh ├── Makefile.am ├── integration-test-common.sh ├── small-integration-test.sh └── Makefile.in ├── src ├── Makefile.am ├── cache.h ├── string_util.h ├── curl.h ├── cache.cpp ├── string_util.cpp ├── s3fs.h ├── curl.cpp └── Makefile.in ├── Makefile.am ├── configure.ac ├── ChangeLog ├── AUTHORS ├── README ├── missing ├── install-sh ├── INSTALL ├── COPYING ├── depcomp └── Makefile.in /NEWS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /doc/Makefile.am: -------------------------------------------------------------------------------- 1 | dist_man1_MANS = man/s3fs.1 2 | -------------------------------------------------------------------------------- /test/require-root.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | if [[ $EUID -ne 0 ]] 4 | then 5 | echo "This test script must be run as root" 1>&2 6 | exit 1 7 | fi 8 | -------------------------------------------------------------------------------- /test/Makefile.am: -------------------------------------------------------------------------------- 1 | TESTS=small-integration-test.sh 2 | 3 | EXTRA_DIST = \ 4 | integration-test-common.sh \ 5 | require-root.sh \ 6 | small-integration-test.sh 7 | 8 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_PROGRAMS=s3fs 2 | 3 | AM_CPPFLAGS = $(DEPS_CFLAGS) 4 | 5 | s3fs_SOURCES = s3fs.cpp s3fs.h curl.cpp curl.h cache.cpp cache.h string_util.cpp string_util.h 6 | s3fs_LDADD = $(DEPS_LIBS) 7 | 8 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS=src test doc 2 | 3 | EXTRA_DIST=doc 4 | 5 | dist-hook: 6 | rm -rf `find $(distdir)/doc -type d -name .svn` 7 | 8 | release : dist ../utils/release.sh 9 | ../utils/release.sh $(DIST_ARCHIVES) 10 | -------------------------------------------------------------------------------- /test/integration-test-common.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | S3FS=../src/s3fs 4 | 5 | S3FS_CREDENTIALS_FILE=$(eval echo ~${SUDO_USER}/.passwd-s3fs) 6 | 7 | TEST_BUCKET_1=${SUDO_USER}-s3fs-integration-test 8 | TEST_BUCKET_MOUNT_POINT_1=/mnt/${TEST_BUCKET_1} 9 | 10 | if [ ! -f "$S3FS_CREDENTIALS_FILE" ] 11 | then 12 | echo "Missing credentials file: $S3FS_CREDENTIALS_FILE" 13 | exit 1 14 | fi 15 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | dnl Process this file with autoconf to produce a configure script. 2 | 3 | AC_PREREQ(2.59) 4 | AC_INIT(s3fs, 1.61) 5 | 6 | 7 | AC_CANONICAL_SYSTEM 8 | AM_INIT_AUTOMAKE() 9 | 10 | AC_PROG_CXX 11 | 12 | CXXFLAGS="$CXXFLAGS -Wall -D_FILE_OFFSET_BITS=64" 13 | 14 | PKG_CHECK_MODULES([DEPS], [fuse >= 2.8.4 libcurl >= 7.0 libxml-2.0 >= 2.6 libcrypto >= 0.9]) 15 | 16 | AC_CONFIG_FILES(Makefile src/Makefile test/Makefile doc/Makefile) 17 | AC_OUTPUT 18 | 19 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | ChangeLog for S3FS-C 2 | ------------------ 3 | 4 | Sep 7, 2011 5 | 6 | memorycraft forked s3fs-c, merge from s3fs-1.61. 7 | 8 | Aug 19, 2011 9 | 10 | Tong Wang forked s3fs-1.59, made it compatible with other S3 tools. 11 | 12 | Version 1.1 -- Mon Oct 18 2010 13 | 14 | Dan Moore reopens the project and fixes various issues that had accumulated in the tracker. Adrian Petrescu converts the project to autotools and posts it to GitHub. 15 | 16 | Version 1.0 -- 2008 17 | 18 | Randy Rizun releases a basic version of S3FS on Google Code. 19 | -------------------------------------------------------------------------------- /src/cache.h: -------------------------------------------------------------------------------- 1 | #ifndef S3FS_CACHE_H_ 2 | #define S3FS_CACHE_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | struct stat_cache_entry { 9 | struct stat stbuf; 10 | unsigned long hit_count; 11 | 12 | stat_cache_entry() : hit_count(0) {} 13 | }; 14 | 15 | extern bool foreground; 16 | extern unsigned long max_stat_cache_size; 17 | 18 | int get_stat_cache_entry(const char *path, struct stat *buf); 19 | void add_stat_cache_entry(const char *path, struct stat *st); 20 | void delete_stat_cache_entry(const char *path); 21 | void truncate_stat_cache(); 22 | 23 | #endif // S3FS_CACHE_H_ 24 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | 1. Randy Rizun 2 | 3 | Wrote from scratch the initial version of S3FS. 4 | 5 | 2. Dan Moore 6 | 7 | Patches and improvements. 8 | 9 | 3. Adrian Petrescu 10 | 11 | Converted the project to be autotools-based. 12 | 13 | 4. Tong Wang 14 | 15 | Rewrite and make it compatible with other tools (s3cmd, AWS Management Console, etc). Supports explicit folder objects (key names end with /) and implicit folders. It is no longer compatible with the original s3fs. 16 | 17 | 5. memorycraft 18 | 19 | Merge s3fs-1.61 into s3fs-c()1.59. 20 | 21 | 6. lightpriest 22 | 23 | Added compatibility for folders that were created by original s3fs (Content-Type: application/x-directory) 24 | 25 | 7. Franc Carter 26 | 27 | Added support for using credntials from instance meta-data 28 | 29 | -------------------------------------------------------------------------------- /src/string_util.h: -------------------------------------------------------------------------------- 1 | #ifndef S3FS_STRING_UTIL_H_ 2 | #define S3FS_STRING_UTIL_H_ 3 | 4 | /* 5 | * A collection of string utilities for manipulating URLs and HTTP responses. 6 | */ 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | 13 | #define SPACES " \t\r\n" 14 | 15 | template std::string str(T value) { 16 | std::stringstream s; 17 | s << value; 18 | return s.str(); 19 | } 20 | 21 | extern bool debug; 22 | extern bool foreground; 23 | extern bool service_validated; 24 | 25 | extern std::string bucket; 26 | 27 | std::string trim_left(const std::string &s, const std::string &t = SPACES); 28 | std::string trim_right(const std::string &s, const std::string &t = SPACES); 29 | std::string trim(const std::string &s, const std::string &t = SPACES); 30 | std::string lower(std::string s); 31 | std::string IntToStr(int); 32 | std::string get_date(); 33 | std::string urlEncode(const std::string &s); 34 | std::string prepare_url(const char* url); 35 | 36 | 37 | #endif // S3FS_STRING_UTIL_H_ 38 | -------------------------------------------------------------------------------- /src/curl.h: -------------------------------------------------------------------------------- 1 | #ifndef S3FS_CURL_H_ 2 | #define S3FS_CURL_H_ 3 | 4 | // memory structure for curl write memory callback 5 | struct BodyStruct { 6 | char *text; 7 | size_t size; 8 | }; 9 | 10 | // memory structure for POST 11 | struct WriteThis { 12 | const char *readptr; 13 | int sizeleft; 14 | }; 15 | 16 | typedef std::pair progress_t; 17 | 18 | extern int retries; 19 | extern long connect_timeout; 20 | extern time_t readwrite_timeout; 21 | extern bool debug; 22 | extern std::string program_name; 23 | extern std::string ssl_verify_hostname; 24 | 25 | CURL *create_curl_handle(void); 26 | void destroy_curl_handle(CURL *curl_handle); 27 | int my_curl_easy_perform(CURL* curl, BodyStruct* body = NULL, FILE* f = 0); 28 | size_t WriteMemoryCallback(void *ptr, size_t blockSize, size_t numBlocks, void *data); 29 | size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp); 30 | int my_curl_progress( 31 | void *clientp, double dltotal, double dlnow, double ultotal, double ulnow); 32 | void locate_bundle(void); 33 | 34 | #endif // S3FS_CURL_H_ 35 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | S3FS-C 2 | 3 | S3FS-C is a FUSE (File System in User Space) based file system backed by Amazon S3 buckets. Once mounted, a S3 bucket can be used just like it was a local file system. 4 | 5 | This project was forked from S3FS (http://code.google.com/p/s3fs/) release 1.59 (updated to 1.61) and being rewritten to be compatible with other S3 clients such as s3cmd, AWS Management Console, etc. Some major differences between S3FS-C and S3FS include: 6 | 7 | * S3FS-C supports folder objects created by AWS Management Console. AWS management Console's folder is a zero-byte object with key that ends with a slash, i.e. "folder_name/". S3FS however uses a different folder scheme: folder is a zero-byte object with it matadata Content-Type set to application/x-directory. 8 | * S3FS-C also supports implicit (virtual) folders, folders that do not have any S3 objects to represent them, but are implied by keys of other S3 objects. For example key "abc/def.txt" implies a folder called "abc". That makes S3FS-C compatible with many S3 clients such as s3cmd. 9 | * Unlike S3FS, S3FS-C no longer relies on object's metadata to store information about files and directories, such as uid, gid, mode, modified time. The main reason is that other S3 clients do not populate these matadata. For compatibility reason, S3FS-C can't assume the presence of the metadata. As a result, S3FS-C no longer reads matadata for each file to populate stat, saving one HTTP HEAD call for each file. 10 | * For compatibility reason, S3FS-C does not support symbolic links, as S3FS's symbolic links are shown as regular objects in other S3 clients. 11 | 12 | Although S3FS-C is compatible with other S3 clients, it is NOT compatible with s3fs. 13 | 14 | For installation and other instructions, see http://code.google.com/p/s3fs/wiki/FuseOverAmazon 15 | 16 | Known Issues: 17 | ------------- 18 | S3FS-C should be working fine with S3 storage. However, There are couple of limitations: 19 | 20 | * There is no full UID/GID support. Owner and group are all "root". chown operation is a no-op. 21 | * File and directory's permissions are hard-coded to be "rwxrwxrwx". chmode operation is a no-op. If you want to secure the S3 bucket, set the owners and permissions of the mount point appropriately. 22 | -------------------------------------------------------------------------------- /src/cache.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * s3fs - FUSE-based file system backed by Amazon S3 3 | * 4 | * Copyright 2007-2008 Randy Rizun 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #include "cache.h" 30 | 31 | using namespace std; 32 | 33 | typedef std::map stat_cache_t; // key=path 34 | static stat_cache_t stat_cache; 35 | pthread_mutex_t stat_cache_lock; 36 | 37 | int get_stat_cache_entry(const char *path, struct stat *buf) { 38 | pthread_mutex_lock(&stat_cache_lock); 39 | stat_cache_t::iterator iter = stat_cache.find(path); 40 | if(iter != stat_cache.end()) { 41 | if(foreground) 42 | cout << " stat cache hit [path=" << path << "]" 43 | << " [hit count=" << (*iter).second.hit_count << "]" << endl; 44 | 45 | if(buf != NULL) 46 | *buf = (*iter).second.stbuf; 47 | 48 | (*iter).second.hit_count++; 49 | pthread_mutex_unlock(&stat_cache_lock); 50 | return 0; 51 | } 52 | pthread_mutex_unlock(&stat_cache_lock); 53 | 54 | return -1; 55 | } 56 | 57 | void add_stat_cache_entry(const char *path, struct stat *st) { 58 | if(foreground) 59 | cout << " add_stat_cache_entry[path=" << path << "]" << endl; 60 | 61 | if(stat_cache.size() > max_stat_cache_size) 62 | truncate_stat_cache(); 63 | 64 | pthread_mutex_lock(&stat_cache_lock); 65 | stat_cache[path].stbuf = *st; 66 | pthread_mutex_unlock(&stat_cache_lock); 67 | } 68 | 69 | void delete_stat_cache_entry(const char *path) { 70 | if(foreground) 71 | cout << " delete_stat_cache_entry[path=" << path << "]" << endl; 72 | 73 | pthread_mutex_lock(&stat_cache_lock); 74 | stat_cache_t::iterator iter = stat_cache.find(path); 75 | if(iter != stat_cache.end()) 76 | stat_cache.erase(iter); 77 | pthread_mutex_unlock(&stat_cache_lock); 78 | } 79 | 80 | void truncate_stat_cache() { 81 | string path_to_delete; 82 | unsigned int hit_count = 0; 83 | unsigned int lowest_hit_count = 0; 84 | 85 | pthread_mutex_lock(&stat_cache_lock); 86 | stat_cache_t::iterator iter; 87 | for(iter = stat_cache.begin(); iter != stat_cache.end(); iter++) { 88 | hit_count = (* iter).second.hit_count; 89 | 90 | if(!lowest_hit_count) 91 | lowest_hit_count = hit_count; 92 | 93 | if(lowest_hit_count > hit_count) 94 | path_to_delete = (* iter).first; 95 | } 96 | 97 | stat_cache.erase(path_to_delete); 98 | pthread_mutex_unlock(&stat_cache_lock); 99 | 100 | cout << " purged " << path_to_delete << " from the stat cache" << endl; 101 | } 102 | -------------------------------------------------------------------------------- /src/string_util.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * s3fs - FUSE-based file system backed by Amazon S3 3 | * 4 | * Copyright 2007-2008 Randy Rizun 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | #include 21 | #include 22 | 23 | #include 24 | #include 25 | 26 | #include "string_util.h" 27 | 28 | using namespace std; 29 | 30 | static const char hexAlphabet[] = "0123456789ABCDEF"; 31 | 32 | string lower(string s) { 33 | // change each character of the string to lower case 34 | for(unsigned int i = 0; i < s.length(); i++) 35 | s[i] = tolower(s[i]); 36 | 37 | return s; 38 | } 39 | 40 | string IntToStr(int n) { 41 | stringstream result; 42 | result << n; 43 | return result.str(); 44 | } 45 | 46 | string trim_left(const string &s, const string &t /* = SPACES */) { 47 | string d(s); 48 | return d.erase(0, s.find_first_not_of(t)); 49 | } 50 | 51 | string trim_right(const string &s, const string &t /* = SPACES */) { 52 | string d(s); 53 | string::size_type i(d.find_last_not_of(t)); 54 | if (i == string::npos) 55 | return ""; 56 | else 57 | return d.erase(d.find_last_not_of(t) + 1); 58 | } 59 | 60 | string trim(const string &s, const string &t /* = SPACES */) { 61 | string d(s); 62 | return trim_left(trim_right(d, t), t); 63 | } 64 | 65 | /** 66 | * urlEncode a fuse path, 67 | * taking into special consideration "/", 68 | * otherwise regular urlEncode. 69 | */ 70 | string urlEncode(const string &s) { 71 | string result; 72 | for (unsigned i = 0; i < s.length(); ++i) { 73 | if (s[i] == '/') // Note- special case for fuse paths... 74 | result += s[i]; 75 | else if (isalnum(s[i])) 76 | result += s[i]; 77 | else if (s[i] == '.' || s[i] == '-' || s[i] == '*' || s[i] == '_') 78 | result += s[i]; 79 | else if (s[i] == ' ') 80 | result += '+'; 81 | else { 82 | result += "%"; 83 | result += hexAlphabet[static_cast(s[i]) / 16]; 84 | result += hexAlphabet[static_cast(s[i]) % 16]; 85 | } 86 | } 87 | 88 | return result; 89 | } 90 | 91 | string prepare_url(const char* url) { 92 | if(debug) 93 | syslog(LOG_DEBUG, "URL is %s", url); 94 | 95 | string uri; 96 | string host; 97 | string path; 98 | string url_str = str(url); 99 | string token = str("/" + bucket); 100 | int bucket_pos = url_str.find(token); 101 | int bucket_length = token.size(); 102 | int uri_length = 7; 103 | 104 | if(!strncasecmp(url_str.c_str(), "https://", 8)) 105 | uri_length = 8; 106 | 107 | uri = url_str.substr(0, uri_length); 108 | host = bucket + "." + url_str.substr(uri_length, bucket_pos - uri_length).c_str(); 109 | path = url_str.substr((bucket_pos + bucket_length)); 110 | 111 | url_str = uri + host + path; 112 | 113 | if(debug) 114 | syslog(LOG_DEBUG, "URL changed is %s", url_str.c_str()); 115 | 116 | return str(url_str); 117 | } 118 | 119 | /** 120 | * Returns the current date 121 | * in a format suitable for a HTTP request header. 122 | */ 123 | string get_date() { 124 | char buf[100]; 125 | time_t t = time(NULL); 126 | strftime(buf, sizeof(buf), "%a, %d %b %Y %H:%M:%S GMT", gmtime(&t)); 127 | return buf; 128 | } 129 | -------------------------------------------------------------------------------- /doc/man/s3fs.1: -------------------------------------------------------------------------------- 1 | .TH S3FS "1" "February 2011" "S3FS" "User Commands" 2 | .SH NAME 3 | S3FS \- FUSE-based file system backed by Amazon S3 4 | .SH SYNOPSIS 5 | .SS mounting 6 | .TP 7 | \fBs3fs bucket[:path] mountpoint \fP [options] 8 | .SS unmounting 9 | .TP 10 | \fBumount mountpoint 11 | .SH DESCRIPTION 12 | s3fs is a FUSE filesystem that allows you to mount an Amazon S3 bucket as a local filesystem. It stores files natively and transparently in S3 (i.e., you can use other programs to access the same files). 13 | .SH AUTHENTICATION 14 | The s3fs password file has this format (use this format if you have only one set of credentials): 15 | .RS 4 16 | \fBaccessKeyId\fP:\fBsecretAccessKey\fP 17 | .RE 18 | 19 | If you have more than one set of credentials, this syntax is also recognized: 20 | .RS 4 21 | \fBbucketName\fP:\fBaccessKeyId\fP:\fBsecretAccessKey\fP 22 | .RE 23 | .PP 24 | Password files can be stored in two locations: 25 | .RS 4 26 | \fB/etc/passwd-s3fs\fP [0600] 27 | \fB$HOME/.passwd-s3fs\fP [0640] 28 | .RE 29 | .SH OPTIONS 30 | .SS "general options" 31 | .TP 32 | \fB\-h\fR \fB\-\-help\fR 33 | print help 34 | .TP 35 | \fB\ \fR \fB\-\-version\fR 36 | print version 37 | .TP 38 | \fB\-f\fR 39 | FUSE foreground option - do not run as daemon. 40 | .TP 41 | \fB\-s\fR 42 | FUSE singlethreaded option (disables multi-threaded operation) 43 | .SS "mount options" 44 | .TP 45 | All s3fs options must given in the form where "opt" is: 46 | = 47 | .TP 48 | \fB\-o\fR default_acl (default="private") 49 | the default canned acl to apply to all written S3 objects, e.g., "public-read". 50 | Any created files will have this canned acl. 51 | Any updated files will also have this canned acl applied! 52 | .TP 53 | \fB\-o\fR prefix (default="") (coming soon!) 54 | a prefix to append to all S3 objects. 55 | .TP 56 | \fB\-o\fR retries (default="2") 57 | number of times to retry a failed S3 transaction. 58 | .TP 59 | \fB\-o\fR use_cache (default="" which means disabled) 60 | local folder to use for local file cache. 61 | .TP 62 | \fB\-o\fR use_rrs (default="" which means disabled) 63 | use Amazon's Reduced Redundancy Storage. 64 | .TP 65 | \fB\-o\fR passwd_file (default="") 66 | specify the path to the password file, which which takes precedence over the password in $HOME/.passwd-s3fs and /etc/passwd-s3fs 67 | .TP 68 | \fB\-o\fR public_bucket (default="" which means disabled) 69 | anonymously mount a public bucket when set to 1, ignores the $HOME/.passwd-s3fs and /etc/passwd-s3fs files. 70 | .TP 71 | \fB\-o\fR connect_timeout (default="10" seconds) 72 | time to wait for connection before giving up. 73 | .TP 74 | \fB\-o\fR readwrite_timeout (default="30" seconds) 75 | time to wait between read/write activity before giving up. 76 | .TP 77 | \fB\-o\fR max_stat_cache_size (default="10000" entries (about 4MB)) 78 | maximum number of entries in the stat cache 79 | .TP 80 | \fB\-o\fR url (default="http://s3.amazonaws.com") 81 | sets the url to use to access Amazon S3. If you want to use HTTPS, then you can set url=https://s3.amazonaws.com 82 | .TP 83 | \fB\-o\fR iam_role (no default) 84 | set the IAM Role that will supply the credentials from the instance meta-data 85 | .TP 86 | \fB\-o\fR nomultipart - disable multipart uploads 87 | .SH FUSE/MOUNT OPTIONS 88 | .TP 89 | Most of the generic mount options described in 'man mount' are supported (ro, rw, suid, nosuid, dev, nodev, exec, noexec, atime, noatime, sync async, dirsync). Filesystems are mounted with '-onodev,nosuid' by default, which can only be overridden by a privileged user. 90 | .TP 91 | There are many FUSE specific mount options that can be specified. e.g. allow_other. See the FUSE README for the full set. 92 | .SH NOTES 93 | .TP 94 | Maximum file size=64GB (limited by s3fs, not Amazon). 95 | .TP 96 | If enabled via the "use_cache" option, s3fs automatically maintains a local cache of files in the folder specified by use_cache. Whenever s3fs needs to read or write a file on S3, it first downloads the entire file locally to the folder specified by use_cache and operates on it. When fuse_release() is called, s3fs will re-upload the file to S3 if it has been changed. s3fs uses md5 checksums to minimize downloads from S3. 97 | .TP 98 | The folder specified by use_cache is just a local cache. It can be deleted at any time. s3fs rebuilds it on demand. 99 | .TP 100 | Local file caching works by calculating and comparing md5 checksums (ETag HTTP header). 101 | .TP 102 | s3fs leverages /etc/mime.types to "guess" the "correct" content-type based on file name extension. This means that you can copy a website to S3 and serve it up directly from S3 with correct content-types! 103 | .SH BUGS 104 | Due to S3's "eventual consistency" limitations, file creation can and will occasionally fail. Even after a successful create, subsequent reads can fail for an indeterminate time, even after one or more successful reads. Create and read enough files and you will eventually encounter this failure. This is not a flaw in s3fs and it is not something a FUSE wrapper like s3fs can work around. The retries option does not address this issue. Your application must either tolerate or compensate for these failures, for example by retrying creates or reads. 105 | .SH AUTHOR 106 | s3fs has been written by Randy Rizun . 107 | -------------------------------------------------------------------------------- /src/s3fs.h: -------------------------------------------------------------------------------- 1 | #ifndef S3FS_S3_H_ 2 | #define S3FS_S3_H_ 3 | 4 | #define FUSE_USE_VERSION 26 5 | #define MULTIPART_SIZE 10485760 // 10MB 6 | #define MAX_REQUESTS 100 // max number of concurrent HTTP requests 7 | #define MAX_COPY_SOURCE_SIZE 524288000 // 500MB 8 | #define FIVE_GB 5368709120LL 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | #define YIKES(result) if (true) { \ 25 | syslog(LOG_ERR, "%d###result=%d", __LINE__, result); \ 26 | return result; \ 27 | } 28 | 29 | #define CREDENTIALS_URL "http://169.254.169.254/latest/meta-data/iam/security-credentials/" 30 | 31 | struct MemoryStruct { 32 | char *memory; 33 | size_t size; 34 | }; 35 | 36 | long connect_timeout = 10; 37 | time_t readwrite_timeout = 30; 38 | 39 | int retries = 2; 40 | 41 | bool debug = 0; 42 | bool foreground = 0; 43 | bool nomultipart = false; 44 | static std::string host = "http://s3.amazonaws.com"; 45 | static std::string service_path = "/"; 46 | std::string bucket = ""; 47 | std::string mount_prefix = ""; 48 | std::string iam_role = ""; 49 | static std::string mountpoint; 50 | std::string program_name; 51 | static std::string AWSAccessKeyId; 52 | static std::string AWSSecretAccessKey; 53 | static std::string AWSAccessToken; 54 | static time_t AWSAccessTokenExpiry; 55 | static mode_t root_mode = 0; 56 | static std::string passwd_file = ""; 57 | static bool utility_mode = 0; 58 | unsigned long max_stat_cache_size = 10000; 59 | 60 | // if .size()==0 then local file cache is disabled 61 | static std::string use_cache; 62 | static std::string use_rrs; 63 | std::string ssl_verify_hostname = "1"; 64 | static std::string public_bucket; 65 | 66 | extern pthread_mutex_t stat_cache_lock; 67 | extern pthread_mutex_t curl_handles_lock; 68 | extern std::string curl_ca_bundle; 69 | 70 | // TODO(apetresc): make this an enum 71 | // private, public-read, public-read-write, authenticated-read 72 | static std::string default_acl("private"); 73 | 74 | struct file_part { 75 | char path[17]; 76 | std::string etag; 77 | bool uploaded; 78 | 79 | file_part() : uploaded(false) {} 80 | }; 81 | 82 | static const char hexAlphabet[] = "0123456789ABCDEF"; 83 | 84 | // http headers 85 | typedef std::map headers_t; 86 | 87 | static const EVP_MD* evp_md = EVP_sha1(); 88 | 89 | // fd -> flags 90 | typedef std::map s3fs_descriptors_t; 91 | static s3fs_descriptors_t s3fs_descriptors; 92 | static pthread_mutex_t s3fs_descriptors_lock; 93 | 94 | static pthread_mutex_t *mutex_buf = NULL; 95 | 96 | static struct fuse_operations s3fs_oper; 97 | 98 | std::string lookupMimeType(std::string); 99 | std::string initiate_multipart_upload(const char *path, off_t size, headers_t meta); 100 | std::string upload_part(const char *path, const char *source, int part_number, std::string upload_id); 101 | std::string copy_part(const char *from, const char *to, int part_number, std::string upload_id, headers_t meta); 102 | static int complete_multipart_upload(const char *path, std::string upload_id, std::vector parts); 103 | std::string md5sum(int fd); 104 | char *get_realpath(const char *path); 105 | 106 | static int insert_object(const char *name, bool is_common_prefix, long last_modified, long size, struct s3_object **head); 107 | static int free_object(struct s3_object *object); 108 | static int free_object_list(struct s3_object *head); 109 | 110 | static CURL *create_head_handle(struct head_data *request); 111 | static int list_bucket(const char *path, struct s3_object **head); 112 | static bool is_truncated(const char *xml); 113 | static int append_objects_from_xml(const char *xml, struct s3_object **head); 114 | static const char *get_next_marker(const char *xml); 115 | static std::string get_object_name(xmlDocPtr doc, xmlNodePtr node); 116 | static std::string get_string(xmlDocPtr doc, xmlNodePtr node); 117 | static long get_time(xmlDocPtr doc, xmlNodePtr node); 118 | 119 | static int put_headers(const char *path, headers_t meta); 120 | static int put_multipart_headers(const char *path, headers_t meta); 121 | 122 | static int s3fs_getattr(const char *path, struct stat *stbuf); 123 | static int _s3fs_getattr(const char *path, struct stat *stbuf, bool resolve_no_entity); 124 | static int s3fs_readlink(const char *path, char *buf, size_t size); 125 | static int s3fs_mknod(const char* path, mode_t mode, dev_t rdev); 126 | static int s3fs_mkdir(const char *path, mode_t mode); 127 | static int s3fs_unlink(const char *path); 128 | static int s3fs_rmdir(const char *path); 129 | static int s3fs_symlink(const char *from, const char *to); 130 | static int s3fs_rename(const char *from, const char *to); 131 | static int s3fs_link(const char *from, const char *to); 132 | static int s3fs_chmod(const char *path, mode_t mode); 133 | static int s3fs_chown(const char *path, uid_t uid, gid_t gid); 134 | static int s3fs_truncate(const char *path, off_t size); 135 | static int s3fs_open(const char *path, struct fuse_file_info *fi); 136 | static int s3fs_read( 137 | const char *path, char *buf, size_t size, off_t offset, struct fuse_file_info *fi); 138 | static int s3fs_write( 139 | const char *path, const char *buf, size_t size, off_t offset, struct fuse_file_info *fi); 140 | static int s3fs_statfs(const char *path, struct statvfs *stbuf); 141 | static int s3fs_flush(const char *path, struct fuse_file_info *fi); 142 | static int s3fs_release(const char *path, struct fuse_file_info *fi); 143 | static int s3fs_readdir( 144 | const char *path, void *buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info *fi); 145 | static int s3fs_access(const char *path, int mask); 146 | static int s3fs_utimens(const char *path, const struct timespec ts[2]); 147 | //static int remote_mountpath_exists(const char *path); 148 | static void* s3fs_init(struct fuse_conn_info *conn); 149 | static void s3fs_destroy(void*); 150 | 151 | #endif // S3FS_S3_H_ 152 | -------------------------------------------------------------------------------- /test/small-integration-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | COMMON=integration-test-common.sh 3 | source $COMMON 4 | 5 | # Require root 6 | REQUIRE_ROOT=require-root.sh 7 | source $REQUIRE_ROOT 8 | 9 | # Configuration 10 | TEST_TEXT="HELLO WORLD" 11 | TEST_TEXT_FILE=test-s3fs.txt 12 | TEST_DIR=testdir 13 | ALT_TEST_TEXT_FILE=test-s3fs-ALT.txt 14 | TEST_TEXT_FILE_LENGTH=15 15 | 16 | # Mount the bucket 17 | if [ ! -d $TEST_BUCKET_MOUNT_POINT_1 ] 18 | then 19 | mkdir -p $TEST_BUCKET_MOUNT_POINT_1 20 | fi 21 | $S3FS $TEST_BUCKET_1 $TEST_BUCKET_MOUNT_POINT_1 -o passwd_file=$S3FS_CREDENTIALS_FILE 22 | CUR_DIR=`pwd` 23 | cd $TEST_BUCKET_MOUNT_POINT_1 24 | 25 | if [ -e $TEST_TEXT_FILE ] 26 | then 27 | rm -f $TEST_TEXT_FILE 28 | fi 29 | 30 | # Write a small test file 31 | for x in `seq 1 $TEST_TEXT_FILE_LENGTH` 32 | do 33 | echo "echo ${TEST_TEXT} to ${TEST_TEXT_FILE}" 34 | echo $TEST_TEXT >> $TEST_TEXT_FILE 35 | done 36 | 37 | # Verify contents of file 38 | echo "Verifying length of test file" 39 | FILE_LENGTH=`wc -l $TEST_TEXT_FILE | awk '{print $1}'` 40 | if [ "$FILE_LENGTH" -ne "$TEST_TEXT_FILE_LENGTH" ] 41 | then 42 | echo "error: expected $TEST_TEXT_FILE_LENGTH , got $FILE_LENGTH" 43 | exit 1 44 | fi 45 | 46 | # Delete the test file 47 | rm $TEST_TEXT_FILE 48 | if [ -e $TEST_TEXT_FILE ] 49 | then 50 | echo "Could not delete file, it still exists" 51 | exit 1 52 | fi 53 | 54 | ########################################################## 55 | # Rename test (individual file) 56 | ########################################################## 57 | echo "Testing mv file function ..." 58 | 59 | 60 | # if the rename file exists, delete it 61 | if [ -e $ALT_TEST_TEXT_FILE ] 62 | then 63 | rm $ALT_TEST_TEXT_FILE 64 | fi 65 | 66 | if [ -e $ALT_TEST_TEXT_FILE ] 67 | then 68 | echo "Could not delete file ${ALT_TEST_TEXT_FILE}, it still exists" 69 | exit 1 70 | fi 71 | 72 | # create the test file again 73 | echo $TEST_TEXT > $TEST_TEXT_FILE 74 | if [ ! -e $TEST_TEXT_FILE ] 75 | then 76 | echo "Could not create file ${TEST_TEXT_FILE}, it does not exist" 77 | exit 1 78 | fi 79 | 80 | #rename the test file 81 | mv $TEST_TEXT_FILE $ALT_TEST_TEXT_FILE 82 | if [ ! -e $ALT_TEST_TEXT_FILE ] 83 | then 84 | echo "Could not move file" 85 | exit 1 86 | fi 87 | 88 | # Check the contents of the alt file 89 | ALT_TEXT_LENGTH=`echo $TEST_TEXT | wc -c | awk '{print $1}'` 90 | ALT_FILE_LENGTH=`wc -c $ALT_TEST_TEXT_FILE | awk '{print $1}'` 91 | if [ "$ALT_FILE_LENGTH" -ne "$ALT_TEXT_LENGTH" ] 92 | then 93 | echo "moved file length is not as expected expected: $ALT_TEXT_LENGTH got: $ALT_FILE_LENGTH" 94 | exit 1 95 | fi 96 | 97 | # clean up 98 | rm $ALT_TEST_TEXT_FILE 99 | 100 | if [ -e $ALT_TEST_TEXT_FILE ] 101 | then 102 | echo "Could not cleanup file ${ALT_TEST_TEXT_FILE}, it still exists" 103 | exit 1 104 | fi 105 | 106 | ########################################################## 107 | # Rename test (individual directory) 108 | ########################################################## 109 | echo "Testing directory mv directory function ..." 110 | if [ -e $TEST_DIR ]; then 111 | echo "Unexpected, this file/directory exists: ${TEST_DIR}" 112 | exit 1 113 | fi 114 | 115 | mkdir ${TEST_DIR} 116 | 117 | if [ ! -d ${TEST_DIR} ]; then 118 | echo "Directory ${TEST_DIR} was not created" 119 | exit 1 120 | fi 121 | 122 | mv ${TEST_DIR} ${TEST_DIR}_rename 123 | 124 | if [ ! -d "${TEST_DIR}_rename" ]; then 125 | echo "Directory ${TEST_DIR} was not renamed" 126 | exit 1 127 | fi 128 | 129 | rmdir ${TEST_DIR}_rename 130 | if [ -e "${TEST_DIR}_rename" ]; then 131 | echo "Could not remove the test directory, it still exists: ${TEST_DIR}_rename" 132 | exit 1 133 | fi 134 | 135 | ################################################################### 136 | # test redirects > and >> 137 | ################################################################### 138 | echo "Testing redirects ..." 139 | 140 | echo ABCDEF > $TEST_TEXT_FILE 141 | if [ ! -e $TEST_TEXT_FILE ] 142 | then 143 | echo "Could not create file ${TEST_TEXT_FILE}, it does not exist" 144 | exit 1 145 | fi 146 | 147 | CONTENT=`cat $TEST_TEXT_FILE` 148 | 149 | if [ ${CONTENT} != "ABCDEF" ]; then 150 | echo "CONTENT read is unexpected, got ${CONTENT}, expected ABCDEF" 151 | exit 1 152 | fi 153 | 154 | echo XYZ > $TEST_TEXT_FILE 155 | 156 | CONTENT=`cat $TEST_TEXT_FILE` 157 | 158 | if [ ${CONTENT} != "XYZ" ]; then 159 | echo "CONTENT read is unexpected, got ${CONTENT}, expected XYZ" 160 | exit 1 161 | fi 162 | 163 | echo 123456 >> $TEST_TEXT_FILE 164 | 165 | LINE1=`sed -n '1,1p' $TEST_TEXT_FILE` 166 | LINE2=`sed -n '2,2p' $TEST_TEXT_FILE` 167 | 168 | if [ ${LINE1} != "XYZ" ]; then 169 | echo "LINE1 was not as expected, got ${LINE1}, expected XYZ" 170 | exit 1 171 | fi 172 | 173 | if [ ${LINE2} != "123456" ]; then 174 | echo "LINE2 was not as expected, got ${LINE2}, expected 123456" 175 | exit 1 176 | fi 177 | 178 | 179 | # clean up 180 | rm $TEST_TEXT_FILE 181 | 182 | if [ -e $TEST_TEXT_FILE ] 183 | then 184 | echo "Could not cleanup file ${TEST_TEXT_FILE}, it still exists" 185 | exit 1 186 | fi 187 | 188 | ##################################################################### 189 | # Simple directory test mkdir/rmdir 190 | ##################################################################### 191 | echo "Testing creation/removal of a directory" 192 | 193 | if [ -e $TEST_DIR ]; then 194 | echo "Unexpected, this file/directory exists: ${TEST_DIR}" 195 | exit 1 196 | fi 197 | 198 | mkdir ${TEST_DIR} 199 | 200 | if [ ! -d ${TEST_DIR} ]; then 201 | echo "Directory ${TEST_DIR} was not created" 202 | exit 1 203 | fi 204 | 205 | rmdir ${TEST_DIR} 206 | if [ -e $TEST_DIR ]; then 207 | echo "Could not remove the test directory, it still exists: ${TEST_DIR}" 208 | exit 1 209 | fi 210 | 211 | ########################################################## 212 | # File permissions test (individual file) 213 | ########################################################## 214 | echo "Testing chmod file function ..." 215 | 216 | # create the test file again 217 | echo $TEST_TEXT > $TEST_TEXT_FILE 218 | if [ ! -e $TEST_TEXT_FILE ] 219 | then 220 | echo "Could not create file ${TEST_TEXT_FILE}" 221 | exit 1 222 | fi 223 | 224 | ORIGINAL_PERMISSIONS=$(stat --format=%a $TEST_TEXT_FILE) 225 | 226 | chmod 777 $TEST_TEXT_FILE; 227 | 228 | # if they're the same, we have a problem. 229 | if [ $(stat --format=%a $TEST_TEXT_FILE) == $ORIGINAL_PERMISSIONS ] 230 | then 231 | echo "Could not modify $TEST_TEXT_FILE permissions" 232 | exit 1 233 | fi 234 | 235 | # clean up 236 | rm $TEST_TEXT_FILE 237 | 238 | if [ -e $TEST_TEXT_FILE ] 239 | then 240 | echo "Could not cleanup file ${TEST_TEXT_FILE}" 241 | exit 1 242 | fi 243 | 244 | ##################################################################### 245 | # Tests are finished 246 | ##################################################################### 247 | 248 | # Unmount the bucket 249 | cd $CUR_DIR 250 | umount $TEST_BUCKET_MOUNT_POINT_1 251 | 252 | echo "All tests complete." 253 | -------------------------------------------------------------------------------- /missing: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Common stub for a few missing GNU programs while installing. 3 | 4 | scriptversion=2009-04-28.21; # UTC 5 | 6 | # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 7 | # 2008, 2009 Free Software Foundation, Inc. 8 | # Originally by Fran,cois Pinard , 1996. 9 | 10 | # This program is free software; you can redistribute it and/or modify 11 | # it under the terms of the GNU General Public License as published by 12 | # the Free Software Foundation; either version 2, or (at your option) 13 | # any later version. 14 | 15 | # This program is distributed in the hope that it will be useful, 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | # GNU General Public License for more details. 19 | 20 | # You should have received a copy of the GNU General Public License 21 | # along with this program. If not, see . 22 | 23 | # As a special exception to the GNU General Public License, if you 24 | # distribute this file as part of a program that contains a 25 | # configuration script generated by Autoconf, you may include it under 26 | # the same distribution terms that you use for the rest of that program. 27 | 28 | if test $# -eq 0; then 29 | echo 1>&2 "Try \`$0 --help' for more information" 30 | exit 1 31 | fi 32 | 33 | run=: 34 | sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' 35 | sed_minuso='s/.* -o \([^ ]*\).*/\1/p' 36 | 37 | # In the cases where this matters, `missing' is being run in the 38 | # srcdir already. 39 | if test -f configure.ac; then 40 | configure_ac=configure.ac 41 | else 42 | configure_ac=configure.in 43 | fi 44 | 45 | msg="missing on your system" 46 | 47 | case $1 in 48 | --run) 49 | # Try to run requested program, and just exit if it succeeds. 50 | run= 51 | shift 52 | "$@" && exit 0 53 | # Exit code 63 means version mismatch. This often happens 54 | # when the user try to use an ancient version of a tool on 55 | # a file that requires a minimum version. In this case we 56 | # we should proceed has if the program had been absent, or 57 | # if --run hadn't been passed. 58 | if test $? = 63; then 59 | run=: 60 | msg="probably too old" 61 | fi 62 | ;; 63 | 64 | -h|--h|--he|--hel|--help) 65 | echo "\ 66 | $0 [OPTION]... PROGRAM [ARGUMENT]... 67 | 68 | Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an 69 | error status if there is no known handling for PROGRAM. 70 | 71 | Options: 72 | -h, --help display this help and exit 73 | -v, --version output version information and exit 74 | --run try to run the given command, and emulate it if it fails 75 | 76 | Supported PROGRAM values: 77 | aclocal touch file \`aclocal.m4' 78 | autoconf touch file \`configure' 79 | autoheader touch file \`config.h.in' 80 | autom4te touch the output file, or create a stub one 81 | automake touch all \`Makefile.in' files 82 | bison create \`y.tab.[ch]', if possible, from existing .[ch] 83 | flex create \`lex.yy.c', if possible, from existing .c 84 | help2man touch the output file 85 | lex create \`lex.yy.c', if possible, from existing .c 86 | makeinfo touch the output file 87 | tar try tar, gnutar, gtar, then tar without non-portable flags 88 | yacc create \`y.tab.[ch]', if possible, from existing .[ch] 89 | 90 | Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and 91 | \`g' are ignored when checking the name. 92 | 93 | Send bug reports to ." 94 | exit $? 95 | ;; 96 | 97 | -v|--v|--ve|--ver|--vers|--versi|--versio|--version) 98 | echo "missing $scriptversion (GNU Automake)" 99 | exit $? 100 | ;; 101 | 102 | -*) 103 | echo 1>&2 "$0: Unknown \`$1' option" 104 | echo 1>&2 "Try \`$0 --help' for more information" 105 | exit 1 106 | ;; 107 | 108 | esac 109 | 110 | # normalize program name to check for. 111 | program=`echo "$1" | sed ' 112 | s/^gnu-//; t 113 | s/^gnu//; t 114 | s/^g//; t'` 115 | 116 | # Now exit if we have it, but it failed. Also exit now if we 117 | # don't have it and --version was passed (most likely to detect 118 | # the program). This is about non-GNU programs, so use $1 not 119 | # $program. 120 | case $1 in 121 | lex*|yacc*) 122 | # Not GNU programs, they don't have --version. 123 | ;; 124 | 125 | tar*) 126 | if test -n "$run"; then 127 | echo 1>&2 "ERROR: \`tar' requires --run" 128 | exit 1 129 | elif test "x$2" = "x--version" || test "x$2" = "x--help"; then 130 | exit 1 131 | fi 132 | ;; 133 | 134 | *) 135 | if test -z "$run" && ($1 --version) > /dev/null 2>&1; then 136 | # We have it, but it failed. 137 | exit 1 138 | elif test "x$2" = "x--version" || test "x$2" = "x--help"; then 139 | # Could not run --version or --help. This is probably someone 140 | # running `$TOOL --version' or `$TOOL --help' to check whether 141 | # $TOOL exists and not knowing $TOOL uses missing. 142 | exit 1 143 | fi 144 | ;; 145 | esac 146 | 147 | # If it does not exist, or fails to run (possibly an outdated version), 148 | # try to emulate it. 149 | case $program in 150 | aclocal*) 151 | echo 1>&2 "\ 152 | WARNING: \`$1' is $msg. You should only need it if 153 | you modified \`acinclude.m4' or \`${configure_ac}'. You might want 154 | to install the \`Automake' and \`Perl' packages. Grab them from 155 | any GNU archive site." 156 | touch aclocal.m4 157 | ;; 158 | 159 | autoconf*) 160 | echo 1>&2 "\ 161 | WARNING: \`$1' is $msg. You should only need it if 162 | you modified \`${configure_ac}'. You might want to install the 163 | \`Autoconf' and \`GNU m4' packages. Grab them from any GNU 164 | archive site." 165 | touch configure 166 | ;; 167 | 168 | autoheader*) 169 | echo 1>&2 "\ 170 | WARNING: \`$1' is $msg. You should only need it if 171 | you modified \`acconfig.h' or \`${configure_ac}'. You might want 172 | to install the \`Autoconf' and \`GNU m4' packages. Grab them 173 | from any GNU archive site." 174 | files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` 175 | test -z "$files" && files="config.h" 176 | touch_files= 177 | for f in $files; do 178 | case $f in 179 | *:*) touch_files="$touch_files "`echo "$f" | 180 | sed -e 's/^[^:]*://' -e 's/:.*//'`;; 181 | *) touch_files="$touch_files $f.in";; 182 | esac 183 | done 184 | touch $touch_files 185 | ;; 186 | 187 | automake*) 188 | echo 1>&2 "\ 189 | WARNING: \`$1' is $msg. You should only need it if 190 | you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. 191 | You might want to install the \`Automake' and \`Perl' packages. 192 | Grab them from any GNU archive site." 193 | find . -type f -name Makefile.am -print | 194 | sed 's/\.am$/.in/' | 195 | while read f; do touch "$f"; done 196 | ;; 197 | 198 | autom4te*) 199 | echo 1>&2 "\ 200 | WARNING: \`$1' is needed, but is $msg. 201 | You might have modified some files without having the 202 | proper tools for further handling them. 203 | You can get \`$1' as part of \`Autoconf' from any GNU 204 | archive site." 205 | 206 | file=`echo "$*" | sed -n "$sed_output"` 207 | test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 208 | if test -f "$file"; then 209 | touch $file 210 | else 211 | test -z "$file" || exec >$file 212 | echo "#! /bin/sh" 213 | echo "# Created by GNU Automake missing as a replacement of" 214 | echo "# $ $@" 215 | echo "exit 0" 216 | chmod +x $file 217 | exit 1 218 | fi 219 | ;; 220 | 221 | bison*|yacc*) 222 | echo 1>&2 "\ 223 | WARNING: \`$1' $msg. You should only need it if 224 | you modified a \`.y' file. You may need the \`Bison' package 225 | in order for those modifications to take effect. You can get 226 | \`Bison' from any GNU archive site." 227 | rm -f y.tab.c y.tab.h 228 | if test $# -ne 1; then 229 | eval LASTARG="\${$#}" 230 | case $LASTARG in 231 | *.y) 232 | SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` 233 | if test -f "$SRCFILE"; then 234 | cp "$SRCFILE" y.tab.c 235 | fi 236 | SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` 237 | if test -f "$SRCFILE"; then 238 | cp "$SRCFILE" y.tab.h 239 | fi 240 | ;; 241 | esac 242 | fi 243 | if test ! -f y.tab.h; then 244 | echo >y.tab.h 245 | fi 246 | if test ! -f y.tab.c; then 247 | echo 'main() { return 0; }' >y.tab.c 248 | fi 249 | ;; 250 | 251 | lex*|flex*) 252 | echo 1>&2 "\ 253 | WARNING: \`$1' is $msg. You should only need it if 254 | you modified a \`.l' file. You may need the \`Flex' package 255 | in order for those modifications to take effect. You can get 256 | \`Flex' from any GNU archive site." 257 | rm -f lex.yy.c 258 | if test $# -ne 1; then 259 | eval LASTARG="\${$#}" 260 | case $LASTARG in 261 | *.l) 262 | SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` 263 | if test -f "$SRCFILE"; then 264 | cp "$SRCFILE" lex.yy.c 265 | fi 266 | ;; 267 | esac 268 | fi 269 | if test ! -f lex.yy.c; then 270 | echo 'main() { return 0; }' >lex.yy.c 271 | fi 272 | ;; 273 | 274 | help2man*) 275 | echo 1>&2 "\ 276 | WARNING: \`$1' is $msg. You should only need it if 277 | you modified a dependency of a manual page. You may need the 278 | \`Help2man' package in order for those modifications to take 279 | effect. You can get \`Help2man' from any GNU archive site." 280 | 281 | file=`echo "$*" | sed -n "$sed_output"` 282 | test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 283 | if test -f "$file"; then 284 | touch $file 285 | else 286 | test -z "$file" || exec >$file 287 | echo ".ab help2man is required to generate this page" 288 | exit $? 289 | fi 290 | ;; 291 | 292 | makeinfo*) 293 | echo 1>&2 "\ 294 | WARNING: \`$1' is $msg. You should only need it if 295 | you modified a \`.texi' or \`.texinfo' file, or any other file 296 | indirectly affecting the aspect of the manual. The spurious 297 | call might also be the consequence of using a buggy \`make' (AIX, 298 | DU, IRIX). You might want to install the \`Texinfo' package or 299 | the \`GNU make' package. Grab either from any GNU archive site." 300 | # The file to touch is that specified with -o ... 301 | file=`echo "$*" | sed -n "$sed_output"` 302 | test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 303 | if test -z "$file"; then 304 | # ... or it is the one specified with @setfilename ... 305 | infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` 306 | file=`sed -n ' 307 | /^@setfilename/{ 308 | s/.* \([^ ]*\) *$/\1/ 309 | p 310 | q 311 | }' $infile` 312 | # ... or it is derived from the source name (dir/f.texi becomes f.info) 313 | test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info 314 | fi 315 | # If the file does not exist, the user really needs makeinfo; 316 | # let's fail without touching anything. 317 | test -f $file || exit 1 318 | touch $file 319 | ;; 320 | 321 | tar*) 322 | shift 323 | 324 | # We have already tried tar in the generic part. 325 | # Look for gnutar/gtar before invocation to avoid ugly error 326 | # messages. 327 | if (gnutar --version > /dev/null 2>&1); then 328 | gnutar "$@" && exit 0 329 | fi 330 | if (gtar --version > /dev/null 2>&1); then 331 | gtar "$@" && exit 0 332 | fi 333 | firstarg="$1" 334 | if shift; then 335 | case $firstarg in 336 | *o*) 337 | firstarg=`echo "$firstarg" | sed s/o//` 338 | tar "$firstarg" "$@" && exit 0 339 | ;; 340 | esac 341 | case $firstarg in 342 | *h*) 343 | firstarg=`echo "$firstarg" | sed s/h//` 344 | tar "$firstarg" "$@" && exit 0 345 | ;; 346 | esac 347 | fi 348 | 349 | echo 1>&2 "\ 350 | WARNING: I can't seem to be able to run \`tar' with the given arguments. 351 | You may want to install GNU tar or Free paxutils, or check the 352 | command line arguments." 353 | exit 1 354 | ;; 355 | 356 | *) 357 | echo 1>&2 "\ 358 | WARNING: \`$1' is needed, and is $msg. 359 | You might have modified some files without having the 360 | proper tools for further handling them. Check the \`README' file, 361 | it often tells you about the needed prerequisites for installing 362 | this package. You may also peek at any GNU archive site, in case 363 | some other package would contain this missing \`$1' program." 364 | exit 1 365 | ;; 366 | esac 367 | 368 | exit 0 369 | 370 | # Local variables: 371 | # eval: (add-hook 'write-file-hooks 'time-stamp) 372 | # time-stamp-start: "scriptversion=" 373 | # time-stamp-format: "%:y-%02m-%02d.%02H" 374 | # time-stamp-time-zone: "UTC" 375 | # time-stamp-end: "; # UTC" 376 | # End: 377 | -------------------------------------------------------------------------------- /test/Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.11.1 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 5 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, 6 | # Inc. 7 | # This Makefile.in is free software; the Free Software Foundation 8 | # gives unlimited permission to copy and/or distribute it, 9 | # with or without modifications, as long as this notice is preserved. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 13 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 14 | # PARTICULAR PURPOSE. 15 | 16 | @SET_MAKE@ 17 | VPATH = @srcdir@ 18 | pkgdatadir = $(datadir)/@PACKAGE@ 19 | pkgincludedir = $(includedir)/@PACKAGE@ 20 | pkglibdir = $(libdir)/@PACKAGE@ 21 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 22 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 23 | install_sh_DATA = $(install_sh) -c -m 644 24 | install_sh_PROGRAM = $(install_sh) -c 25 | install_sh_SCRIPT = $(install_sh) -c 26 | INSTALL_HEADER = $(INSTALL_DATA) 27 | transform = $(program_transform_name) 28 | NORMAL_INSTALL = : 29 | PRE_INSTALL = : 30 | POST_INSTALL = : 31 | NORMAL_UNINSTALL = : 32 | PRE_UNINSTALL = : 33 | POST_UNINSTALL = : 34 | build_triplet = @build@ 35 | host_triplet = @host@ 36 | target_triplet = @target@ 37 | subdir = test 38 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in 39 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 40 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 41 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 42 | $(ACLOCAL_M4) 43 | mkinstalldirs = $(install_sh) -d 44 | CONFIG_CLEAN_FILES = 45 | CONFIG_CLEAN_VPATH_FILES = 46 | SOURCES = 47 | DIST_SOURCES = 48 | am__tty_colors = \ 49 | red=; grn=; lgn=; blu=; std= 50 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 51 | ACLOCAL = @ACLOCAL@ 52 | AMTAR = @AMTAR@ 53 | AUTOCONF = @AUTOCONF@ 54 | AUTOHEADER = @AUTOHEADER@ 55 | AUTOMAKE = @AUTOMAKE@ 56 | AWK = @AWK@ 57 | CPPFLAGS = @CPPFLAGS@ 58 | CXX = @CXX@ 59 | CXXDEPMODE = @CXXDEPMODE@ 60 | CXXFLAGS = @CXXFLAGS@ 61 | CYGPATH_W = @CYGPATH_W@ 62 | DEFS = @DEFS@ 63 | DEPDIR = @DEPDIR@ 64 | DEPS_CFLAGS = @DEPS_CFLAGS@ 65 | DEPS_LIBS = @DEPS_LIBS@ 66 | ECHO_C = @ECHO_C@ 67 | ECHO_N = @ECHO_N@ 68 | ECHO_T = @ECHO_T@ 69 | EXEEXT = @EXEEXT@ 70 | INSTALL = @INSTALL@ 71 | INSTALL_DATA = @INSTALL_DATA@ 72 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 73 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 74 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 75 | LDFLAGS = @LDFLAGS@ 76 | LIBOBJS = @LIBOBJS@ 77 | LIBS = @LIBS@ 78 | LTLIBOBJS = @LTLIBOBJS@ 79 | MAKEINFO = @MAKEINFO@ 80 | MKDIR_P = @MKDIR_P@ 81 | OBJEXT = @OBJEXT@ 82 | PACKAGE = @PACKAGE@ 83 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 84 | PACKAGE_NAME = @PACKAGE_NAME@ 85 | PACKAGE_STRING = @PACKAGE_STRING@ 86 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 87 | PACKAGE_URL = @PACKAGE_URL@ 88 | PACKAGE_VERSION = @PACKAGE_VERSION@ 89 | PATH_SEPARATOR = @PATH_SEPARATOR@ 90 | PKG_CONFIG = @PKG_CONFIG@ 91 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ 92 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ 93 | SET_MAKE = @SET_MAKE@ 94 | SHELL = @SHELL@ 95 | STRIP = @STRIP@ 96 | VERSION = @VERSION@ 97 | abs_builddir = @abs_builddir@ 98 | abs_srcdir = @abs_srcdir@ 99 | abs_top_builddir = @abs_top_builddir@ 100 | abs_top_srcdir = @abs_top_srcdir@ 101 | ac_ct_CXX = @ac_ct_CXX@ 102 | am__include = @am__include@ 103 | am__leading_dot = @am__leading_dot@ 104 | am__quote = @am__quote@ 105 | am__tar = @am__tar@ 106 | am__untar = @am__untar@ 107 | bindir = @bindir@ 108 | build = @build@ 109 | build_alias = @build_alias@ 110 | build_cpu = @build_cpu@ 111 | build_os = @build_os@ 112 | build_vendor = @build_vendor@ 113 | builddir = @builddir@ 114 | datadir = @datadir@ 115 | datarootdir = @datarootdir@ 116 | docdir = @docdir@ 117 | dvidir = @dvidir@ 118 | exec_prefix = @exec_prefix@ 119 | host = @host@ 120 | host_alias = @host_alias@ 121 | host_cpu = @host_cpu@ 122 | host_os = @host_os@ 123 | host_vendor = @host_vendor@ 124 | htmldir = @htmldir@ 125 | includedir = @includedir@ 126 | infodir = @infodir@ 127 | install_sh = @install_sh@ 128 | libdir = @libdir@ 129 | libexecdir = @libexecdir@ 130 | localedir = @localedir@ 131 | localstatedir = @localstatedir@ 132 | mandir = @mandir@ 133 | mkdir_p = @mkdir_p@ 134 | oldincludedir = @oldincludedir@ 135 | pdfdir = @pdfdir@ 136 | prefix = @prefix@ 137 | program_transform_name = @program_transform_name@ 138 | psdir = @psdir@ 139 | sbindir = @sbindir@ 140 | sharedstatedir = @sharedstatedir@ 141 | srcdir = @srcdir@ 142 | sysconfdir = @sysconfdir@ 143 | target = @target@ 144 | target_alias = @target_alias@ 145 | target_cpu = @target_cpu@ 146 | target_os = @target_os@ 147 | target_vendor = @target_vendor@ 148 | top_build_prefix = @top_build_prefix@ 149 | top_builddir = @top_builddir@ 150 | top_srcdir = @top_srcdir@ 151 | TESTS = small-integration-test.sh 152 | EXTRA_DIST = \ 153 | integration-test-common.sh \ 154 | require-root.sh \ 155 | small-integration-test.sh 156 | 157 | all: all-am 158 | 159 | .SUFFIXES: 160 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 161 | @for dep in $?; do \ 162 | case '$(am__configure_deps)' in \ 163 | *$$dep*) \ 164 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ 165 | && { if test -f $@; then exit 0; else break; fi; }; \ 166 | exit 1;; \ 167 | esac; \ 168 | done; \ 169 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ 170 | $(am__cd) $(top_srcdir) && \ 171 | $(AUTOMAKE) --gnu test/Makefile 172 | .PRECIOUS: Makefile 173 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 174 | @case '$?' in \ 175 | *config.status*) \ 176 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ 177 | *) \ 178 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ 179 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 180 | esac; 181 | 182 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 183 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 184 | 185 | $(top_srcdir)/configure: $(am__configure_deps) 186 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 187 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) 188 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 189 | $(am__aclocal_m4_deps): 190 | tags: TAGS 191 | TAGS: 192 | 193 | ctags: CTAGS 194 | CTAGS: 195 | 196 | 197 | check-TESTS: $(TESTS) 198 | @failed=0; all=0; xfail=0; xpass=0; skip=0; \ 199 | srcdir=$(srcdir); export srcdir; \ 200 | list=' $(TESTS) '; \ 201 | $(am__tty_colors); \ 202 | if test -n "$$list"; then \ 203 | for tst in $$list; do \ 204 | if test -f ./$$tst; then dir=./; \ 205 | elif test -f $$tst; then dir=; \ 206 | else dir="$(srcdir)/"; fi; \ 207 | if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ 208 | all=`expr $$all + 1`; \ 209 | case " $(XFAIL_TESTS) " in \ 210 | *[\ \ ]$$tst[\ \ ]*) \ 211 | xpass=`expr $$xpass + 1`; \ 212 | failed=`expr $$failed + 1`; \ 213 | col=$$red; res=XPASS; \ 214 | ;; \ 215 | *) \ 216 | col=$$grn; res=PASS; \ 217 | ;; \ 218 | esac; \ 219 | elif test $$? -ne 77; then \ 220 | all=`expr $$all + 1`; \ 221 | case " $(XFAIL_TESTS) " in \ 222 | *[\ \ ]$$tst[\ \ ]*) \ 223 | xfail=`expr $$xfail + 1`; \ 224 | col=$$lgn; res=XFAIL; \ 225 | ;; \ 226 | *) \ 227 | failed=`expr $$failed + 1`; \ 228 | col=$$red; res=FAIL; \ 229 | ;; \ 230 | esac; \ 231 | else \ 232 | skip=`expr $$skip + 1`; \ 233 | col=$$blu; res=SKIP; \ 234 | fi; \ 235 | echo "$${col}$$res$${std}: $$tst"; \ 236 | done; \ 237 | if test "$$all" -eq 1; then \ 238 | tests="test"; \ 239 | All=""; \ 240 | else \ 241 | tests="tests"; \ 242 | All="All "; \ 243 | fi; \ 244 | if test "$$failed" -eq 0; then \ 245 | if test "$$xfail" -eq 0; then \ 246 | banner="$$All$$all $$tests passed"; \ 247 | else \ 248 | if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ 249 | banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ 250 | fi; \ 251 | else \ 252 | if test "$$xpass" -eq 0; then \ 253 | banner="$$failed of $$all $$tests failed"; \ 254 | else \ 255 | if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ 256 | banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ 257 | fi; \ 258 | fi; \ 259 | dashes="$$banner"; \ 260 | skipped=""; \ 261 | if test "$$skip" -ne 0; then \ 262 | if test "$$skip" -eq 1; then \ 263 | skipped="($$skip test was not run)"; \ 264 | else \ 265 | skipped="($$skip tests were not run)"; \ 266 | fi; \ 267 | test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ 268 | dashes="$$skipped"; \ 269 | fi; \ 270 | report=""; \ 271 | if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ 272 | report="Please report to $(PACKAGE_BUGREPORT)"; \ 273 | test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ 274 | dashes="$$report"; \ 275 | fi; \ 276 | dashes=`echo "$$dashes" | sed s/./=/g`; \ 277 | if test "$$failed" -eq 0; then \ 278 | echo "$$grn$$dashes"; \ 279 | else \ 280 | echo "$$red$$dashes"; \ 281 | fi; \ 282 | echo "$$banner"; \ 283 | test -z "$$skipped" || echo "$$skipped"; \ 284 | test -z "$$report" || echo "$$report"; \ 285 | echo "$$dashes$$std"; \ 286 | test "$$failed" -eq 0; \ 287 | else :; fi 288 | 289 | distdir: $(DISTFILES) 290 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 291 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 292 | list='$(DISTFILES)'; \ 293 | dist_files=`for file in $$list; do echo $$file; done | \ 294 | sed -e "s|^$$srcdirstrip/||;t" \ 295 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 296 | case $$dist_files in \ 297 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 298 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 299 | sort -u` ;; \ 300 | esac; \ 301 | for file in $$dist_files; do \ 302 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 303 | if test -d $$d/$$file; then \ 304 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 305 | if test -d "$(distdir)/$$file"; then \ 306 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 307 | fi; \ 308 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 309 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 310 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 311 | fi; \ 312 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 313 | else \ 314 | test -f "$(distdir)/$$file" \ 315 | || cp -p $$d/$$file "$(distdir)/$$file" \ 316 | || exit 1; \ 317 | fi; \ 318 | done 319 | check-am: all-am 320 | $(MAKE) $(AM_MAKEFLAGS) check-TESTS 321 | check: check-am 322 | all-am: Makefile 323 | installdirs: 324 | install: install-am 325 | install-exec: install-exec-am 326 | install-data: install-data-am 327 | uninstall: uninstall-am 328 | 329 | install-am: all-am 330 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 331 | 332 | installcheck: installcheck-am 333 | install-strip: 334 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 335 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 336 | `test -z '$(STRIP)' || \ 337 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 338 | mostlyclean-generic: 339 | 340 | clean-generic: 341 | 342 | distclean-generic: 343 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 344 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 345 | 346 | maintainer-clean-generic: 347 | @echo "This command is intended for maintainers to use" 348 | @echo "it deletes files that may require special tools to rebuild." 349 | clean: clean-am 350 | 351 | clean-am: clean-generic mostlyclean-am 352 | 353 | distclean: distclean-am 354 | -rm -f Makefile 355 | distclean-am: clean-am distclean-generic 356 | 357 | dvi: dvi-am 358 | 359 | dvi-am: 360 | 361 | html: html-am 362 | 363 | html-am: 364 | 365 | info: info-am 366 | 367 | info-am: 368 | 369 | install-data-am: 370 | 371 | install-dvi: install-dvi-am 372 | 373 | install-dvi-am: 374 | 375 | install-exec-am: 376 | 377 | install-html: install-html-am 378 | 379 | install-html-am: 380 | 381 | install-info: install-info-am 382 | 383 | install-info-am: 384 | 385 | install-man: 386 | 387 | install-pdf: install-pdf-am 388 | 389 | install-pdf-am: 390 | 391 | install-ps: install-ps-am 392 | 393 | install-ps-am: 394 | 395 | installcheck-am: 396 | 397 | maintainer-clean: maintainer-clean-am 398 | -rm -f Makefile 399 | maintainer-clean-am: distclean-am maintainer-clean-generic 400 | 401 | mostlyclean: mostlyclean-am 402 | 403 | mostlyclean-am: mostlyclean-generic 404 | 405 | pdf: pdf-am 406 | 407 | pdf-am: 408 | 409 | ps: ps-am 410 | 411 | ps-am: 412 | 413 | uninstall-am: 414 | 415 | .MAKE: check-am install-am install-strip 416 | 417 | .PHONY: all all-am check check-TESTS check-am clean clean-generic \ 418 | distclean distclean-generic distdir dvi dvi-am html html-am \ 419 | info info-am install install-am install-data install-data-am \ 420 | install-dvi install-dvi-am install-exec install-exec-am \ 421 | install-html install-html-am install-info install-info-am \ 422 | install-man install-pdf install-pdf-am install-ps \ 423 | install-ps-am install-strip installcheck installcheck-am \ 424 | installdirs maintainer-clean maintainer-clean-generic \ 425 | mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ 426 | uninstall-am 427 | 428 | 429 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 430 | # Otherwise a system limit (for SysV at least) may be exceeded. 431 | .NOEXPORT: 432 | -------------------------------------------------------------------------------- /doc/Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.11.1 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 5 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, 6 | # Inc. 7 | # This Makefile.in is free software; the Free Software Foundation 8 | # gives unlimited permission to copy and/or distribute it, 9 | # with or without modifications, as long as this notice is preserved. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 13 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 14 | # PARTICULAR PURPOSE. 15 | 16 | @SET_MAKE@ 17 | VPATH = @srcdir@ 18 | pkgdatadir = $(datadir)/@PACKAGE@ 19 | pkgincludedir = $(includedir)/@PACKAGE@ 20 | pkglibdir = $(libdir)/@PACKAGE@ 21 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 22 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 23 | install_sh_DATA = $(install_sh) -c -m 644 24 | install_sh_PROGRAM = $(install_sh) -c 25 | install_sh_SCRIPT = $(install_sh) -c 26 | INSTALL_HEADER = $(INSTALL_DATA) 27 | transform = $(program_transform_name) 28 | NORMAL_INSTALL = : 29 | PRE_INSTALL = : 30 | POST_INSTALL = : 31 | NORMAL_UNINSTALL = : 32 | PRE_UNINSTALL = : 33 | POST_UNINSTALL = : 34 | build_triplet = @build@ 35 | host_triplet = @host@ 36 | target_triplet = @target@ 37 | subdir = doc 38 | DIST_COMMON = $(dist_man1_MANS) $(srcdir)/Makefile.am \ 39 | $(srcdir)/Makefile.in 40 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 41 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 42 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 43 | $(ACLOCAL_M4) 44 | mkinstalldirs = $(install_sh) -d 45 | CONFIG_CLEAN_FILES = 46 | CONFIG_CLEAN_VPATH_FILES = 47 | SOURCES = 48 | DIST_SOURCES = 49 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; 50 | am__vpath_adj = case $$p in \ 51 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ 52 | *) f=$$p;; \ 53 | esac; 54 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; 55 | am__install_max = 40 56 | am__nobase_strip_setup = \ 57 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` 58 | am__nobase_strip = \ 59 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" 60 | am__nobase_list = $(am__nobase_strip_setup); \ 61 | for p in $$list; do echo "$$p $$p"; done | \ 62 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ 63 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ 64 | if (++n[$$2] == $(am__install_max)) \ 65 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ 66 | END { for (dir in files) print dir, files[dir] }' 67 | am__base_list = \ 68 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ 69 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' 70 | man1dir = $(mandir)/man1 71 | am__installdirs = "$(DESTDIR)$(man1dir)" 72 | NROFF = nroff 73 | MANS = $(dist_man1_MANS) 74 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 75 | ACLOCAL = @ACLOCAL@ 76 | AMTAR = @AMTAR@ 77 | AUTOCONF = @AUTOCONF@ 78 | AUTOHEADER = @AUTOHEADER@ 79 | AUTOMAKE = @AUTOMAKE@ 80 | AWK = @AWK@ 81 | CPPFLAGS = @CPPFLAGS@ 82 | CXX = @CXX@ 83 | CXXDEPMODE = @CXXDEPMODE@ 84 | CXXFLAGS = @CXXFLAGS@ 85 | CYGPATH_W = @CYGPATH_W@ 86 | DEFS = @DEFS@ 87 | DEPDIR = @DEPDIR@ 88 | DEPS_CFLAGS = @DEPS_CFLAGS@ 89 | DEPS_LIBS = @DEPS_LIBS@ 90 | ECHO_C = @ECHO_C@ 91 | ECHO_N = @ECHO_N@ 92 | ECHO_T = @ECHO_T@ 93 | EXEEXT = @EXEEXT@ 94 | INSTALL = @INSTALL@ 95 | INSTALL_DATA = @INSTALL_DATA@ 96 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 97 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 98 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 99 | LDFLAGS = @LDFLAGS@ 100 | LIBOBJS = @LIBOBJS@ 101 | LIBS = @LIBS@ 102 | LTLIBOBJS = @LTLIBOBJS@ 103 | MAKEINFO = @MAKEINFO@ 104 | MKDIR_P = @MKDIR_P@ 105 | OBJEXT = @OBJEXT@ 106 | PACKAGE = @PACKAGE@ 107 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 108 | PACKAGE_NAME = @PACKAGE_NAME@ 109 | PACKAGE_STRING = @PACKAGE_STRING@ 110 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 111 | PACKAGE_URL = @PACKAGE_URL@ 112 | PACKAGE_VERSION = @PACKAGE_VERSION@ 113 | PATH_SEPARATOR = @PATH_SEPARATOR@ 114 | PKG_CONFIG = @PKG_CONFIG@ 115 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ 116 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ 117 | SET_MAKE = @SET_MAKE@ 118 | SHELL = @SHELL@ 119 | STRIP = @STRIP@ 120 | VERSION = @VERSION@ 121 | abs_builddir = @abs_builddir@ 122 | abs_srcdir = @abs_srcdir@ 123 | abs_top_builddir = @abs_top_builddir@ 124 | abs_top_srcdir = @abs_top_srcdir@ 125 | ac_ct_CXX = @ac_ct_CXX@ 126 | am__include = @am__include@ 127 | am__leading_dot = @am__leading_dot@ 128 | am__quote = @am__quote@ 129 | am__tar = @am__tar@ 130 | am__untar = @am__untar@ 131 | bindir = @bindir@ 132 | build = @build@ 133 | build_alias = @build_alias@ 134 | build_cpu = @build_cpu@ 135 | build_os = @build_os@ 136 | build_vendor = @build_vendor@ 137 | builddir = @builddir@ 138 | datadir = @datadir@ 139 | datarootdir = @datarootdir@ 140 | docdir = @docdir@ 141 | dvidir = @dvidir@ 142 | exec_prefix = @exec_prefix@ 143 | host = @host@ 144 | host_alias = @host_alias@ 145 | host_cpu = @host_cpu@ 146 | host_os = @host_os@ 147 | host_vendor = @host_vendor@ 148 | htmldir = @htmldir@ 149 | includedir = @includedir@ 150 | infodir = @infodir@ 151 | install_sh = @install_sh@ 152 | libdir = @libdir@ 153 | libexecdir = @libexecdir@ 154 | localedir = @localedir@ 155 | localstatedir = @localstatedir@ 156 | mandir = @mandir@ 157 | mkdir_p = @mkdir_p@ 158 | oldincludedir = @oldincludedir@ 159 | pdfdir = @pdfdir@ 160 | prefix = @prefix@ 161 | program_transform_name = @program_transform_name@ 162 | psdir = @psdir@ 163 | sbindir = @sbindir@ 164 | sharedstatedir = @sharedstatedir@ 165 | srcdir = @srcdir@ 166 | sysconfdir = @sysconfdir@ 167 | target = @target@ 168 | target_alias = @target_alias@ 169 | target_cpu = @target_cpu@ 170 | target_os = @target_os@ 171 | target_vendor = @target_vendor@ 172 | top_build_prefix = @top_build_prefix@ 173 | top_builddir = @top_builddir@ 174 | top_srcdir = @top_srcdir@ 175 | dist_man1_MANS = man/s3fs.1 176 | all: all-am 177 | 178 | .SUFFIXES: 179 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 180 | @for dep in $?; do \ 181 | case '$(am__configure_deps)' in \ 182 | *$$dep*) \ 183 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ 184 | && { if test -f $@; then exit 0; else break; fi; }; \ 185 | exit 1;; \ 186 | esac; \ 187 | done; \ 188 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ 189 | $(am__cd) $(top_srcdir) && \ 190 | $(AUTOMAKE) --gnu doc/Makefile 191 | .PRECIOUS: Makefile 192 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 193 | @case '$?' in \ 194 | *config.status*) \ 195 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ 196 | *) \ 197 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ 198 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 199 | esac; 200 | 201 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 202 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 203 | 204 | $(top_srcdir)/configure: $(am__configure_deps) 205 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 206 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) 207 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 208 | $(am__aclocal_m4_deps): 209 | install-man1: $(dist_man1_MANS) 210 | @$(NORMAL_INSTALL) 211 | test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" 212 | @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ 213 | { for i in $$list; do echo "$$i"; done; \ 214 | } | while read p; do \ 215 | if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ 216 | echo "$$d$$p"; echo "$$p"; \ 217 | done | \ 218 | sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ 219 | -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ 220 | sed 'N;N;s,\n, ,g' | { \ 221 | list=; while read file base inst; do \ 222 | if test "$$base" = "$$inst"; then list="$$list $$file"; else \ 223 | echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ 224 | $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ 225 | fi; \ 226 | done; \ 227 | for i in $$list; do echo "$$i"; done | $(am__base_list) | \ 228 | while read files; do \ 229 | test -z "$$files" || { \ 230 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ 231 | $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ 232 | done; } 233 | 234 | uninstall-man1: 235 | @$(NORMAL_UNINSTALL) 236 | @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ 237 | files=`{ for i in $$list; do echo "$$i"; done; \ 238 | } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ 239 | -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ 240 | test -z "$$files" || { \ 241 | echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ 242 | cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } 243 | tags: TAGS 244 | TAGS: 245 | 246 | ctags: CTAGS 247 | CTAGS: 248 | 249 | 250 | distdir: $(DISTFILES) 251 | @list='$(MANS)'; if test -n "$$list"; then \ 252 | list=`for p in $$list; do \ 253 | if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ 254 | if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ 255 | if test -n "$$list" && \ 256 | grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ 257 | echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ 258 | grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ 259 | echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ 260 | echo " typically \`make maintainer-clean' will remove them" >&2; \ 261 | exit 1; \ 262 | else :; fi; \ 263 | else :; fi 264 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 265 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 266 | list='$(DISTFILES)'; \ 267 | dist_files=`for file in $$list; do echo $$file; done | \ 268 | sed -e "s|^$$srcdirstrip/||;t" \ 269 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 270 | case $$dist_files in \ 271 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 272 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 273 | sort -u` ;; \ 274 | esac; \ 275 | for file in $$dist_files; do \ 276 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 277 | if test -d $$d/$$file; then \ 278 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 279 | if test -d "$(distdir)/$$file"; then \ 280 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 281 | fi; \ 282 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 283 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 284 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 285 | fi; \ 286 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 287 | else \ 288 | test -f "$(distdir)/$$file" \ 289 | || cp -p $$d/$$file "$(distdir)/$$file" \ 290 | || exit 1; \ 291 | fi; \ 292 | done 293 | check-am: all-am 294 | check: check-am 295 | all-am: Makefile $(MANS) 296 | installdirs: 297 | for dir in "$(DESTDIR)$(man1dir)"; do \ 298 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 299 | done 300 | install: install-am 301 | install-exec: install-exec-am 302 | install-data: install-data-am 303 | uninstall: uninstall-am 304 | 305 | install-am: all-am 306 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 307 | 308 | installcheck: installcheck-am 309 | install-strip: 310 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 311 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 312 | `test -z '$(STRIP)' || \ 313 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 314 | mostlyclean-generic: 315 | 316 | clean-generic: 317 | 318 | distclean-generic: 319 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 320 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 321 | 322 | maintainer-clean-generic: 323 | @echo "This command is intended for maintainers to use" 324 | @echo "it deletes files that may require special tools to rebuild." 325 | clean: clean-am 326 | 327 | clean-am: clean-generic mostlyclean-am 328 | 329 | distclean: distclean-am 330 | -rm -f Makefile 331 | distclean-am: clean-am distclean-generic 332 | 333 | dvi: dvi-am 334 | 335 | dvi-am: 336 | 337 | html: html-am 338 | 339 | html-am: 340 | 341 | info: info-am 342 | 343 | info-am: 344 | 345 | install-data-am: install-man 346 | 347 | install-dvi: install-dvi-am 348 | 349 | install-dvi-am: 350 | 351 | install-exec-am: 352 | 353 | install-html: install-html-am 354 | 355 | install-html-am: 356 | 357 | install-info: install-info-am 358 | 359 | install-info-am: 360 | 361 | install-man: install-man1 362 | 363 | install-pdf: install-pdf-am 364 | 365 | install-pdf-am: 366 | 367 | install-ps: install-ps-am 368 | 369 | install-ps-am: 370 | 371 | installcheck-am: 372 | 373 | maintainer-clean: maintainer-clean-am 374 | -rm -f Makefile 375 | maintainer-clean-am: distclean-am maintainer-clean-generic 376 | 377 | mostlyclean: mostlyclean-am 378 | 379 | mostlyclean-am: mostlyclean-generic 380 | 381 | pdf: pdf-am 382 | 383 | pdf-am: 384 | 385 | ps: ps-am 386 | 387 | ps-am: 388 | 389 | uninstall-am: uninstall-man 390 | 391 | uninstall-man: uninstall-man1 392 | 393 | .MAKE: install-am install-strip 394 | 395 | .PHONY: all all-am check check-am clean clean-generic distclean \ 396 | distclean-generic distdir dvi dvi-am html html-am info info-am \ 397 | install install-am install-data install-data-am install-dvi \ 398 | install-dvi-am install-exec install-exec-am install-html \ 399 | install-html-am install-info install-info-am install-man \ 400 | install-man1 install-pdf install-pdf-am install-ps \ 401 | install-ps-am install-strip installcheck installcheck-am \ 402 | installdirs maintainer-clean maintainer-clean-generic \ 403 | mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ 404 | uninstall-am uninstall-man uninstall-man1 405 | 406 | 407 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 408 | # Otherwise a system limit (for SysV at least) may be exceeded. 409 | .NOEXPORT: 410 | -------------------------------------------------------------------------------- /src/curl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * s3fs - FUSE-based file system backed by Amazon S3 3 | * 4 | * Copyright 2007-2008 Randy Rizun 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | #include "curl.h" 38 | 39 | using namespace std; 40 | 41 | pthread_mutex_t curl_handles_lock; 42 | std::map curl_times; 43 | std::map curl_progress; 44 | std::string curl_ca_bundle; 45 | 46 | CURL *create_curl_handle(void) { 47 | time_t now; 48 | CURL *curl_handle; 49 | 50 | pthread_mutex_lock(&curl_handles_lock); 51 | curl_handle = curl_easy_init(); 52 | curl_easy_reset(curl_handle); 53 | curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1); 54 | curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, true); 55 | curl_easy_setopt(curl_handle, CURLOPT_CONNECTTIMEOUT, connect_timeout); 56 | curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 0); 57 | curl_easy_setopt(curl_handle, CURLOPT_PROGRESSFUNCTION, my_curl_progress); 58 | curl_easy_setopt(curl_handle, CURLOPT_PROGRESSDATA, curl_handle); 59 | // curl_easy_setopt(curl_handle, CURLOPT_FORBID_REUSE, 1); 60 | 61 | if(ssl_verify_hostname.substr(0,1) == "0") 62 | curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYHOST, 0); 63 | if(curl_ca_bundle.size() != 0) 64 | curl_easy_setopt(curl_handle, CURLOPT_CAINFO, curl_ca_bundle.c_str()); 65 | 66 | now = time(0); 67 | curl_times[curl_handle] = now; 68 | curl_progress[curl_handle] = progress_t(-1, -1); 69 | pthread_mutex_unlock(&curl_handles_lock); 70 | 71 | return curl_handle; 72 | } 73 | 74 | void destroy_curl_handle(CURL *curl_handle) { 75 | if(curl_handle != NULL) { 76 | pthread_mutex_lock(&curl_handles_lock); 77 | curl_times.erase(curl_handle); 78 | curl_progress.erase(curl_handle); 79 | curl_easy_cleanup(curl_handle); 80 | pthread_mutex_unlock(&curl_handles_lock); 81 | } 82 | 83 | return; 84 | } 85 | 86 | /** 87 | * @return fuse return code 88 | */ 89 | int my_curl_easy_perform(CURL* curl, BodyStruct* body, FILE* f) { 90 | char url[256]; 91 | time_t now; 92 | char* ptr_url = url; 93 | curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL , &ptr_url); 94 | 95 | if(debug) 96 | syslog(LOG_DEBUG, "connecting to URL %s", ptr_url); 97 | 98 | // curl_easy_setopt(curl, CURLOPT_VERBOSE, true); 99 | if(ssl_verify_hostname.substr(0,1) == "0") 100 | curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); 101 | 102 | if(curl_ca_bundle.size() != 0) 103 | curl_easy_setopt(curl, CURLOPT_CAINFO, curl_ca_bundle.c_str()); 104 | 105 | long responseCode; 106 | 107 | // 1 attempt + retries... 108 | int t = retries + 1; 109 | while (t-- > 0) { 110 | if (f) { 111 | rewind(f); 112 | } 113 | CURLcode curlCode = curl_easy_perform(curl); 114 | 115 | switch (curlCode) { 116 | case CURLE_OK: 117 | // Need to look at the HTTP response code 118 | 119 | if (curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &responseCode) != 0) { 120 | syslog(LOG_ERR, "curl_easy_getinfo failed while trying to retrieve HTTP response code"); 121 | return -EIO; 122 | } 123 | 124 | if(debug) 125 | syslog(LOG_DEBUG, "HTTP response code %ld", responseCode); 126 | 127 | if (responseCode < 400) { 128 | return 0; 129 | } 130 | 131 | if (responseCode >= 500) { 132 | syslog(LOG_ERR, "###HTTP response=%ld", responseCode); 133 | sleep(4); 134 | break; 135 | } 136 | 137 | // Service response codes which are >= 400 && < 500 138 | switch(responseCode) { 139 | case 400: 140 | if(debug) syslog(LOG_ERR, "HTTP response code 400 was returned"); 141 | if(body) { 142 | if(body->size && debug) { 143 | syslog(LOG_ERR, "Body Text: %s", body->text); 144 | } 145 | } 146 | if(debug) syslog(LOG_DEBUG, "Now returning EIO"); 147 | return -EIO; 148 | 149 | case 403: 150 | if(debug) syslog(LOG_ERR, "HTTP response code 403 was returned"); 151 | if(body) { 152 | if(body->size && debug) { 153 | syslog(LOG_ERR, "Body Text: %s", body->text); 154 | } 155 | } 156 | if(debug) syslog(LOG_DEBUG, "Now returning EIO"); 157 | return -EIO; 158 | 159 | case 404: 160 | if(debug) syslog(LOG_DEBUG, "HTTP response code 404 was returned"); 161 | if(body) { 162 | if(body->size && debug) { 163 | syslog(LOG_DEBUG, "Body Text: %s", body->text); 164 | } 165 | } 166 | if(debug) syslog(LOG_DEBUG, "Now returning ENOENT"); 167 | return -ENOENT; 168 | 169 | default: 170 | syslog(LOG_ERR, "###response=%ld", responseCode); 171 | printf("responseCode %ld\n", responseCode); 172 | if(body) { 173 | if(body->size) { 174 | printf("Body Text %s\n", body->text); 175 | } 176 | } 177 | return -EIO; 178 | } 179 | break; 180 | 181 | case CURLE_WRITE_ERROR: 182 | syslog(LOG_ERR, "### CURLE_WRITE_ERROR"); 183 | sleep(2); 184 | break; 185 | 186 | case CURLE_OPERATION_TIMEDOUT: 187 | syslog(LOG_ERR, "### CURLE_OPERATION_TIMEDOUT"); 188 | sleep(2); 189 | break; 190 | 191 | case CURLE_COULDNT_RESOLVE_HOST: 192 | syslog(LOG_ERR, "### CURLE_COULDNT_RESOLVE_HOST"); 193 | sleep(2); 194 | break; 195 | 196 | case CURLE_COULDNT_CONNECT: 197 | syslog(LOG_ERR, "### CURLE_COULDNT_CONNECT"); 198 | sleep(4); 199 | break; 200 | 201 | case CURLE_GOT_NOTHING: 202 | syslog(LOG_ERR, "### CURLE_GOT_NOTHING"); 203 | sleep(4); 204 | break; 205 | 206 | case CURLE_ABORTED_BY_CALLBACK: 207 | syslog(LOG_ERR, "### CURLE_ABORTED_BY_CALLBACK"); 208 | sleep(4); 209 | now = time(0); 210 | curl_times[curl] = now; 211 | break; 212 | 213 | case CURLE_PARTIAL_FILE: 214 | syslog(LOG_ERR, "### CURLE_PARTIAL_FILE"); 215 | sleep(4); 216 | break; 217 | 218 | case CURLE_SEND_ERROR: 219 | syslog(LOG_ERR, "### CURLE_SEND_ERROR"); 220 | sleep(2); 221 | break; 222 | 223 | case CURLE_RECV_ERROR: 224 | syslog(LOG_ERR, "### CURLE_RECV_ERROR"); 225 | sleep(2); 226 | break; 227 | 228 | case CURLE_SSL_CACERT: 229 | // try to locate cert, if successful, then set the 230 | // option and continue 231 | if (curl_ca_bundle.size() == 0) { 232 | locate_bundle(); 233 | if (curl_ca_bundle.size() != 0) { 234 | t++; 235 | curl_easy_setopt(curl, CURLOPT_CAINFO, curl_ca_bundle.c_str()); 236 | continue; 237 | } 238 | } 239 | syslog(LOG_ERR, "curlCode: %i msg: %s", curlCode, 240 | curl_easy_strerror(curlCode));; 241 | fprintf (stderr, "%s: curlCode: %i -- %s\n", 242 | program_name.c_str(), 243 | curlCode, 244 | curl_easy_strerror(curlCode)); 245 | exit(EXIT_FAILURE); 246 | break; 247 | 248 | #ifdef CURLE_PEER_FAILED_VERIFICATION 249 | case CURLE_PEER_FAILED_VERIFICATION: 250 | first_pos = bucket.find_first_of("."); 251 | if (first_pos != string::npos) { 252 | fprintf (stderr, "%s: curl returned a CURL_PEER_FAILED_VERIFICATION error\n", program_name.c_str()); 253 | fprintf (stderr, "%s: security issue found: buckets with periods in their name are incompatible with https\n", program_name.c_str()); 254 | fprintf (stderr, "%s: This check can be over-ridden by using the -o ssl_verify_hostname=0\n", program_name.c_str()); 255 | fprintf (stderr, "%s: The certificate will still be checked but the hostname will not be verified.\n", program_name.c_str()); 256 | fprintf (stderr, "%s: A more secure method would be to use a bucket name without periods.\n", program_name.c_str()); 257 | } else { 258 | fprintf (stderr, "%s: my_curl_easy_perform: curlCode: %i -- %s\n", 259 | program_name.c_str(), 260 | curlCode, 261 | curl_easy_strerror(curlCode)); 262 | } 263 | exit(EXIT_FAILURE); 264 | break; 265 | #endif 266 | 267 | // This should be invalid since curl option HTTP FAILONERROR is now off 268 | case CURLE_HTTP_RETURNED_ERROR: 269 | syslog(LOG_ERR, "### CURLE_HTTP_RETURNED_ERROR"); 270 | 271 | if (curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &responseCode) != 0) { 272 | return -EIO; 273 | } 274 | syslog(LOG_ERR, "###response=%ld", responseCode); 275 | 276 | // Let's try to retrieve the 277 | 278 | if (responseCode == 404) { 279 | return -ENOENT; 280 | } 281 | if (responseCode < 500) { 282 | return -EIO; 283 | } 284 | break; 285 | 286 | // Unknown CURL return code 287 | default: 288 | syslog(LOG_ERR, "###curlCode: %i msg: %s", curlCode, 289 | curl_easy_strerror(curlCode));; 290 | exit(EXIT_FAILURE); 291 | break; 292 | } 293 | syslog(LOG_ERR, "###retrying..."); 294 | } 295 | syslog(LOG_ERR, "###giving up"); 296 | return -EIO; 297 | } 298 | 299 | // libcurl callback 300 | size_t WriteMemoryCallback(void *ptr, size_t blockSize, size_t numBlocks, void *data) { 301 | size_t realsize = blockSize * numBlocks; 302 | struct BodyStruct *mem = (struct BodyStruct *)data; 303 | 304 | mem->text = (char *)realloc(mem->text, mem->size + realsize + 1); 305 | if(mem->text == NULL) { 306 | /* out of memory! */ 307 | fprintf(stderr, "not enough memory (realloc returned NULL)\n"); 308 | exit(EXIT_FAILURE); 309 | } 310 | 311 | memcpy(&(mem->text[mem->size]), ptr, realsize); 312 | mem->size += realsize; 313 | mem->text[mem->size] = 0; 314 | 315 | return realsize; 316 | } 317 | 318 | // read_callback 319 | // http://curl.haxx.se/libcurl/c/post-callback.html 320 | size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) { 321 | struct WriteThis *pooh = (struct WriteThis *)userp; 322 | 323 | if(size*nmemb < 1) 324 | return 0; 325 | 326 | if(pooh->sizeleft) { 327 | *(char *)ptr = pooh->readptr[0]; /* copy one single byte */ 328 | pooh->readptr++; /* advance pointer */ 329 | pooh->sizeleft--; /* less data left */ 330 | return 1; /* we return 1 byte at a time! */ 331 | } 332 | 333 | return 0; /* no more data left to deliver */ 334 | } 335 | 336 | // homegrown timeout mechanism 337 | int my_curl_progress( 338 | void *clientp, double dltotal, double dlnow, double ultotal, double ulnow) { 339 | CURL* curl = static_cast(clientp); 340 | 341 | time_t now = time(0); 342 | progress_t p(dlnow, ulnow); 343 | 344 | pthread_mutex_lock(&curl_handles_lock); 345 | 346 | // any progress? 347 | if(p != curl_progress[curl]) { 348 | // yes! 349 | curl_times[curl] = now; 350 | curl_progress[curl] = p; 351 | } else { 352 | // timeout? 353 | if (now - curl_times[curl] > readwrite_timeout) { 354 | pthread_mutex_unlock( &curl_handles_lock ); 355 | 356 | syslog(LOG_ERR, "timeout now: %li curl_times[curl]: %lil readwrite_timeout: %li", 357 | (long int)now, curl_times[curl], (long int)readwrite_timeout); 358 | 359 | return CURLE_ABORTED_BY_CALLBACK; 360 | } 361 | } 362 | 363 | pthread_mutex_unlock(&curl_handles_lock); 364 | return 0; 365 | } 366 | 367 | void locate_bundle(void) { 368 | // See if environment variable CURL_CA_BUNDLE is set 369 | // if so, check it, if it is a good path, then set the 370 | // curl_ca_bundle variable to it 371 | char *CURL_CA_BUNDLE; 372 | 373 | if(curl_ca_bundle.size() == 0) { 374 | CURL_CA_BUNDLE = getenv("CURL_CA_BUNDLE"); 375 | if(CURL_CA_BUNDLE != NULL) { 376 | // check for existance and readability of the file 377 | ifstream BF(CURL_CA_BUNDLE); 378 | if(BF.good()) { 379 | BF.close(); 380 | curl_ca_bundle.assign(CURL_CA_BUNDLE); 381 | } else { 382 | fprintf(stderr, "%s: file specified by CURL_CA_BUNDLE environment variable is not readable\n", 383 | program_name.c_str()); 384 | exit(EXIT_FAILURE); 385 | } 386 | 387 | return; 388 | } 389 | } 390 | 391 | // not set via environment variable, look in likely locations 392 | 393 | /////////////////////////////////////////// 394 | // from curl's (7.21.2) acinclude.m4 file 395 | /////////////////////////////////////////// 396 | // dnl CURL_CHECK_CA_BUNDLE 397 | // dnl ------------------------------------------------- 398 | // dnl Check if a default ca-bundle should be used 399 | // dnl 400 | // dnl regarding the paths this will scan: 401 | // dnl /etc/ssl/certs/ca-certificates.crt Debian systems 402 | // dnl /etc/pki/tls/certs/ca-bundle.crt Redhat and Mandriva 403 | // dnl /usr/share/ssl/certs/ca-bundle.crt old(er) Redhat 404 | // dnl /usr/local/share/certs/ca-root.crt FreeBSD 405 | // dnl /etc/ssl/cert.pem OpenBSD 406 | // dnl /etc/ssl/certs/ (ca path) SUSE 407 | ifstream BF("/etc/pki/tls/certs/ca-bundle.crt"); 408 | if(BF.good()) { 409 | BF.close(); 410 | curl_ca_bundle.assign("/etc/pki/tls/certs/ca-bundle.crt"); 411 | return; 412 | } 413 | 414 | return; 415 | } 416 | -------------------------------------------------------------------------------- /install-sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # install - install a program, script, or datafile 3 | 4 | scriptversion=2009-04-28.21; # UTC 5 | 6 | # This originates from X11R5 (mit/util/scripts/install.sh), which was 7 | # later released in X11R6 (xc/config/util/install.sh) with the 8 | # following copyright and license. 9 | # 10 | # Copyright (C) 1994 X Consortium 11 | # 12 | # Permission is hereby granted, free of charge, to any person obtaining a copy 13 | # of this software and associated documentation files (the "Software"), to 14 | # deal in the Software without restriction, including without limitation the 15 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 16 | # sell copies of the Software, and to permit persons to whom the Software is 17 | # furnished to do so, subject to the following conditions: 18 | # 19 | # The above copyright notice and this permission notice shall be included in 20 | # all copies or substantial portions of the Software. 21 | # 22 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 26 | # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- 27 | # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name of the X Consortium shall not 30 | # be used in advertising or otherwise to promote the sale, use or other deal- 31 | # ings in this Software without prior written authorization from the X Consor- 32 | # tium. 33 | # 34 | # 35 | # FSF changes to this file are in the public domain. 36 | # 37 | # Calling this script install-sh is preferred over install.sh, to prevent 38 | # `make' implicit rules from creating a file called install from it 39 | # when there is no Makefile. 40 | # 41 | # This script is compatible with the BSD install script, but was written 42 | # from scratch. 43 | 44 | nl=' 45 | ' 46 | IFS=" "" $nl" 47 | 48 | # set DOITPROG to echo to test this script 49 | 50 | # Don't use :- since 4.3BSD and earlier shells don't like it. 51 | doit=${DOITPROG-} 52 | if test -z "$doit"; then 53 | doit_exec=exec 54 | else 55 | doit_exec=$doit 56 | fi 57 | 58 | # Put in absolute file names if you don't have them in your path; 59 | # or use environment vars. 60 | 61 | chgrpprog=${CHGRPPROG-chgrp} 62 | chmodprog=${CHMODPROG-chmod} 63 | chownprog=${CHOWNPROG-chown} 64 | cmpprog=${CMPPROG-cmp} 65 | cpprog=${CPPROG-cp} 66 | mkdirprog=${MKDIRPROG-mkdir} 67 | mvprog=${MVPROG-mv} 68 | rmprog=${RMPROG-rm} 69 | stripprog=${STRIPPROG-strip} 70 | 71 | posix_glob='?' 72 | initialize_posix_glob=' 73 | test "$posix_glob" != "?" || { 74 | if (set -f) 2>/dev/null; then 75 | posix_glob= 76 | else 77 | posix_glob=: 78 | fi 79 | } 80 | ' 81 | 82 | posix_mkdir= 83 | 84 | # Desired mode of installed file. 85 | mode=0755 86 | 87 | chgrpcmd= 88 | chmodcmd=$chmodprog 89 | chowncmd= 90 | mvcmd=$mvprog 91 | rmcmd="$rmprog -f" 92 | stripcmd= 93 | 94 | src= 95 | dst= 96 | dir_arg= 97 | dst_arg= 98 | 99 | copy_on_change=false 100 | no_target_directory= 101 | 102 | usage="\ 103 | Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE 104 | or: $0 [OPTION]... SRCFILES... DIRECTORY 105 | or: $0 [OPTION]... -t DIRECTORY SRCFILES... 106 | or: $0 [OPTION]... -d DIRECTORIES... 107 | 108 | In the 1st form, copy SRCFILE to DSTFILE. 109 | In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. 110 | In the 4th, create DIRECTORIES. 111 | 112 | Options: 113 | --help display this help and exit. 114 | --version display version info and exit. 115 | 116 | -c (ignored) 117 | -C install only if different (preserve the last data modification time) 118 | -d create directories instead of installing files. 119 | -g GROUP $chgrpprog installed files to GROUP. 120 | -m MODE $chmodprog installed files to MODE. 121 | -o USER $chownprog installed files to USER. 122 | -s $stripprog installed files. 123 | -t DIRECTORY install into DIRECTORY. 124 | -T report an error if DSTFILE is a directory. 125 | 126 | Environment variables override the default commands: 127 | CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG 128 | RMPROG STRIPPROG 129 | " 130 | 131 | while test $# -ne 0; do 132 | case $1 in 133 | -c) ;; 134 | 135 | -C) copy_on_change=true;; 136 | 137 | -d) dir_arg=true;; 138 | 139 | -g) chgrpcmd="$chgrpprog $2" 140 | shift;; 141 | 142 | --help) echo "$usage"; exit $?;; 143 | 144 | -m) mode=$2 145 | case $mode in 146 | *' '* | *' '* | *' 147 | '* | *'*'* | *'?'* | *'['*) 148 | echo "$0: invalid mode: $mode" >&2 149 | exit 1;; 150 | esac 151 | shift;; 152 | 153 | -o) chowncmd="$chownprog $2" 154 | shift;; 155 | 156 | -s) stripcmd=$stripprog;; 157 | 158 | -t) dst_arg=$2 159 | shift;; 160 | 161 | -T) no_target_directory=true;; 162 | 163 | --version) echo "$0 $scriptversion"; exit $?;; 164 | 165 | --) shift 166 | break;; 167 | 168 | -*) echo "$0: invalid option: $1" >&2 169 | exit 1;; 170 | 171 | *) break;; 172 | esac 173 | shift 174 | done 175 | 176 | if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then 177 | # When -d is used, all remaining arguments are directories to create. 178 | # When -t is used, the destination is already specified. 179 | # Otherwise, the last argument is the destination. Remove it from $@. 180 | for arg 181 | do 182 | if test -n "$dst_arg"; then 183 | # $@ is not empty: it contains at least $arg. 184 | set fnord "$@" "$dst_arg" 185 | shift # fnord 186 | fi 187 | shift # arg 188 | dst_arg=$arg 189 | done 190 | fi 191 | 192 | if test $# -eq 0; then 193 | if test -z "$dir_arg"; then 194 | echo "$0: no input file specified." >&2 195 | exit 1 196 | fi 197 | # It's OK to call `install-sh -d' without argument. 198 | # This can happen when creating conditional directories. 199 | exit 0 200 | fi 201 | 202 | if test -z "$dir_arg"; then 203 | trap '(exit $?); exit' 1 2 13 15 204 | 205 | # Set umask so as not to create temps with too-generous modes. 206 | # However, 'strip' requires both read and write access to temps. 207 | case $mode in 208 | # Optimize common cases. 209 | *644) cp_umask=133;; 210 | *755) cp_umask=22;; 211 | 212 | *[0-7]) 213 | if test -z "$stripcmd"; then 214 | u_plus_rw= 215 | else 216 | u_plus_rw='% 200' 217 | fi 218 | cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; 219 | *) 220 | if test -z "$stripcmd"; then 221 | u_plus_rw= 222 | else 223 | u_plus_rw=,u+rw 224 | fi 225 | cp_umask=$mode$u_plus_rw;; 226 | esac 227 | fi 228 | 229 | for src 230 | do 231 | # Protect names starting with `-'. 232 | case $src in 233 | -*) src=./$src;; 234 | esac 235 | 236 | if test -n "$dir_arg"; then 237 | dst=$src 238 | dstdir=$dst 239 | test -d "$dstdir" 240 | dstdir_status=$? 241 | else 242 | 243 | # Waiting for this to be detected by the "$cpprog $src $dsttmp" command 244 | # might cause directories to be created, which would be especially bad 245 | # if $src (and thus $dsttmp) contains '*'. 246 | if test ! -f "$src" && test ! -d "$src"; then 247 | echo "$0: $src does not exist." >&2 248 | exit 1 249 | fi 250 | 251 | if test -z "$dst_arg"; then 252 | echo "$0: no destination specified." >&2 253 | exit 1 254 | fi 255 | 256 | dst=$dst_arg 257 | # Protect names starting with `-'. 258 | case $dst in 259 | -*) dst=./$dst;; 260 | esac 261 | 262 | # If destination is a directory, append the input filename; won't work 263 | # if double slashes aren't ignored. 264 | if test -d "$dst"; then 265 | if test -n "$no_target_directory"; then 266 | echo "$0: $dst_arg: Is a directory" >&2 267 | exit 1 268 | fi 269 | dstdir=$dst 270 | dst=$dstdir/`basename "$src"` 271 | dstdir_status=0 272 | else 273 | # Prefer dirname, but fall back on a substitute if dirname fails. 274 | dstdir=` 275 | (dirname "$dst") 2>/dev/null || 276 | expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 277 | X"$dst" : 'X\(//\)[^/]' \| \ 278 | X"$dst" : 'X\(//\)$' \| \ 279 | X"$dst" : 'X\(/\)' \| . 2>/dev/null || 280 | echo X"$dst" | 281 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 282 | s//\1/ 283 | q 284 | } 285 | /^X\(\/\/\)[^/].*/{ 286 | s//\1/ 287 | q 288 | } 289 | /^X\(\/\/\)$/{ 290 | s//\1/ 291 | q 292 | } 293 | /^X\(\/\).*/{ 294 | s//\1/ 295 | q 296 | } 297 | s/.*/./; q' 298 | ` 299 | 300 | test -d "$dstdir" 301 | dstdir_status=$? 302 | fi 303 | fi 304 | 305 | obsolete_mkdir_used=false 306 | 307 | if test $dstdir_status != 0; then 308 | case $posix_mkdir in 309 | '') 310 | # Create intermediate dirs using mode 755 as modified by the umask. 311 | # This is like FreeBSD 'install' as of 1997-10-28. 312 | umask=`umask` 313 | case $stripcmd.$umask in 314 | # Optimize common cases. 315 | *[2367][2367]) mkdir_umask=$umask;; 316 | .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; 317 | 318 | *[0-7]) 319 | mkdir_umask=`expr $umask + 22 \ 320 | - $umask % 100 % 40 + $umask % 20 \ 321 | - $umask % 10 % 4 + $umask % 2 322 | `;; 323 | *) mkdir_umask=$umask,go-w;; 324 | esac 325 | 326 | # With -d, create the new directory with the user-specified mode. 327 | # Otherwise, rely on $mkdir_umask. 328 | if test -n "$dir_arg"; then 329 | mkdir_mode=-m$mode 330 | else 331 | mkdir_mode= 332 | fi 333 | 334 | posix_mkdir=false 335 | case $umask in 336 | *[123567][0-7][0-7]) 337 | # POSIX mkdir -p sets u+wx bits regardless of umask, which 338 | # is incompatible with FreeBSD 'install' when (umask & 300) != 0. 339 | ;; 340 | *) 341 | tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ 342 | trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 343 | 344 | if (umask $mkdir_umask && 345 | exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 346 | then 347 | if test -z "$dir_arg" || { 348 | # Check for POSIX incompatibilities with -m. 349 | # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or 350 | # other-writeable bit of parent directory when it shouldn't. 351 | # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. 352 | ls_ld_tmpdir=`ls -ld "$tmpdir"` 353 | case $ls_ld_tmpdir in 354 | d????-?r-*) different_mode=700;; 355 | d????-?--*) different_mode=755;; 356 | *) false;; 357 | esac && 358 | $mkdirprog -m$different_mode -p -- "$tmpdir" && { 359 | ls_ld_tmpdir_1=`ls -ld "$tmpdir"` 360 | test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" 361 | } 362 | } 363 | then posix_mkdir=: 364 | fi 365 | rmdir "$tmpdir/d" "$tmpdir" 366 | else 367 | # Remove any dirs left behind by ancient mkdir implementations. 368 | rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null 369 | fi 370 | trap '' 0;; 371 | esac;; 372 | esac 373 | 374 | if 375 | $posix_mkdir && ( 376 | umask $mkdir_umask && 377 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" 378 | ) 379 | then : 380 | else 381 | 382 | # The umask is ridiculous, or mkdir does not conform to POSIX, 383 | # or it failed possibly due to a race condition. Create the 384 | # directory the slow way, step by step, checking for races as we go. 385 | 386 | case $dstdir in 387 | /*) prefix='/';; 388 | -*) prefix='./';; 389 | *) prefix='';; 390 | esac 391 | 392 | eval "$initialize_posix_glob" 393 | 394 | oIFS=$IFS 395 | IFS=/ 396 | $posix_glob set -f 397 | set fnord $dstdir 398 | shift 399 | $posix_glob set +f 400 | IFS=$oIFS 401 | 402 | prefixes= 403 | 404 | for d 405 | do 406 | test -z "$d" && continue 407 | 408 | prefix=$prefix$d 409 | if test -d "$prefix"; then 410 | prefixes= 411 | else 412 | if $posix_mkdir; then 413 | (umask=$mkdir_umask && 414 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break 415 | # Don't fail if two instances are running concurrently. 416 | test -d "$prefix" || exit 1 417 | else 418 | case $prefix in 419 | *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; 420 | *) qprefix=$prefix;; 421 | esac 422 | prefixes="$prefixes '$qprefix'" 423 | fi 424 | fi 425 | prefix=$prefix/ 426 | done 427 | 428 | if test -n "$prefixes"; then 429 | # Don't fail if two instances are running concurrently. 430 | (umask $mkdir_umask && 431 | eval "\$doit_exec \$mkdirprog $prefixes") || 432 | test -d "$dstdir" || exit 1 433 | obsolete_mkdir_used=true 434 | fi 435 | fi 436 | fi 437 | 438 | if test -n "$dir_arg"; then 439 | { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && 440 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && 441 | { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || 442 | test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 443 | else 444 | 445 | # Make a couple of temp file names in the proper directory. 446 | dsttmp=$dstdir/_inst.$$_ 447 | rmtmp=$dstdir/_rm.$$_ 448 | 449 | # Trap to clean up those temp files at exit. 450 | trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 451 | 452 | # Copy the file name to the temp name. 453 | (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && 454 | 455 | # and set any options; do chmod last to preserve setuid bits. 456 | # 457 | # If any of these fail, we abort the whole thing. If we want to 458 | # ignore errors from any of these, just make sure not to ignore 459 | # errors from the above "$doit $cpprog $src $dsttmp" command. 460 | # 461 | { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && 462 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && 463 | { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && 464 | { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && 465 | 466 | # If -C, don't bother to copy if it wouldn't change the file. 467 | if $copy_on_change && 468 | old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && 469 | new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && 470 | 471 | eval "$initialize_posix_glob" && 472 | $posix_glob set -f && 473 | set X $old && old=:$2:$4:$5:$6 && 474 | set X $new && new=:$2:$4:$5:$6 && 475 | $posix_glob set +f && 476 | 477 | test "$old" = "$new" && 478 | $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 479 | then 480 | rm -f "$dsttmp" 481 | else 482 | # Rename the file to the real destination. 483 | $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || 484 | 485 | # The rename failed, perhaps because mv can't rename something else 486 | # to itself, or perhaps because mv is so ancient that it does not 487 | # support -f. 488 | { 489 | # Now remove or move aside any old file at destination location. 490 | # We try this two ways since rm can't unlink itself on some 491 | # systems and the destination file might be busy for other 492 | # reasons. In this case, the final cleanup might fail but the new 493 | # file should still install successfully. 494 | { 495 | test ! -f "$dst" || 496 | $doit $rmcmd -f "$dst" 2>/dev/null || 497 | { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && 498 | { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } 499 | } || 500 | { echo "$0: cannot unlink or rename $dst" >&2 501 | (exit 1); exit 1 502 | } 503 | } && 504 | 505 | # Now rename the file to the real destination. 506 | $doit $mvcmd "$dsttmp" "$dst" 507 | } 508 | fi || exit 1 509 | 510 | trap '' 0 511 | fi 512 | done 513 | 514 | # Local variables: 515 | # eval: (add-hook 'write-file-hooks 'time-stamp) 516 | # time-stamp-start: "scriptversion=" 517 | # time-stamp-format: "%:y-%02m-%02d.%02H" 518 | # time-stamp-time-zone: "UTC" 519 | # time-stamp-end: "; # UTC" 520 | # End: 521 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | Installation Instructions 2 | ************************* 3 | 4 | Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5 | 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 6 | 7 | Copying and distribution of this file, with or without modification, 8 | are permitted in any medium without royalty provided the copyright 9 | notice and this notice are preserved. This file is offered as-is, 10 | without warranty of any kind. 11 | 12 | Basic Installation 13 | ================== 14 | 15 | Briefly, the shell commands `./configure; make; make install' should 16 | configure, build, and install this package. The following 17 | more-detailed instructions are generic; see the `README' file for 18 | instructions specific to this package. Some packages provide this 19 | `INSTALL' file but do not implement all of the features documented 20 | below. The lack of an optional feature in a given package is not 21 | necessarily a bug. More recommendations for GNU packages can be found 22 | in *note Makefile Conventions: (standards)Makefile Conventions. 23 | 24 | The `configure' shell script attempts to guess correct values for 25 | various system-dependent variables used during compilation. It uses 26 | those values to create a `Makefile' in each directory of the package. 27 | It may also create one or more `.h' files containing system-dependent 28 | definitions. Finally, it creates a shell script `config.status' that 29 | you can run in the future to recreate the current configuration, and a 30 | file `config.log' containing compiler output (useful mainly for 31 | debugging `configure'). 32 | 33 | It can also use an optional file (typically called `config.cache' 34 | and enabled with `--cache-file=config.cache' or simply `-C') that saves 35 | the results of its tests to speed up reconfiguring. Caching is 36 | disabled by default to prevent problems with accidental use of stale 37 | cache files. 38 | 39 | If you need to do unusual things to compile the package, please try 40 | to figure out how `configure' could check whether to do them, and mail 41 | diffs or instructions to the address given in the `README' so they can 42 | be considered for the next release. If you are using the cache, and at 43 | some point `config.cache' contains results you don't want to keep, you 44 | may remove or edit it. 45 | 46 | The file `configure.ac' (or `configure.in') is used to create 47 | `configure' by a program called `autoconf'. You need `configure.ac' if 48 | you want to change it or regenerate `configure' using a newer version 49 | of `autoconf'. 50 | 51 | The simplest way to compile this package is: 52 | 53 | 1. `cd' to the directory containing the package's source code and type 54 | `./configure' to configure the package for your system. 55 | 56 | Running `configure' might take a while. While running, it prints 57 | some messages telling which features it is checking for. 58 | 59 | 2. Type `make' to compile the package. 60 | 61 | 3. Optionally, type `make check' to run any self-tests that come with 62 | the package, generally using the just-built uninstalled binaries. 63 | 64 | 4. Type `make install' to install the programs and any data files and 65 | documentation. When installing into a prefix owned by root, it is 66 | recommended that the package be configured and built as a regular 67 | user, and only the `make install' phase executed with root 68 | privileges. 69 | 70 | 5. Optionally, type `make installcheck' to repeat any self-tests, but 71 | this time using the binaries in their final installed location. 72 | This target does not install anything. Running this target as a 73 | regular user, particularly if the prior `make install' required 74 | root privileges, verifies that the installation completed 75 | correctly. 76 | 77 | 6. You can remove the program binaries and object files from the 78 | source code directory by typing `make clean'. To also remove the 79 | files that `configure' created (so you can compile the package for 80 | a different kind of computer), type `make distclean'. There is 81 | also a `make maintainer-clean' target, but that is intended mainly 82 | for the package's developers. If you use it, you may have to get 83 | all sorts of other programs in order to regenerate files that came 84 | with the distribution. 85 | 86 | 7. Often, you can also type `make uninstall' to remove the installed 87 | files again. In practice, not all packages have tested that 88 | uninstallation works correctly, even though it is required by the 89 | GNU Coding Standards. 90 | 91 | 8. Some packages, particularly those that use Automake, provide `make 92 | distcheck', which can by used by developers to test that all other 93 | targets like `make install' and `make uninstall' work correctly. 94 | This target is generally not run by end users. 95 | 96 | Compilers and Options 97 | ===================== 98 | 99 | Some systems require unusual options for compilation or linking that 100 | the `configure' script does not know about. Run `./configure --help' 101 | for details on some of the pertinent environment variables. 102 | 103 | You can give `configure' initial values for configuration parameters 104 | by setting variables in the command line or in the environment. Here 105 | is an example: 106 | 107 | ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108 | 109 | *Note Defining Variables::, for more details. 110 | 111 | Compiling For Multiple Architectures 112 | ==================================== 113 | 114 | You can compile the package for more than one kind of computer at the 115 | same time, by placing the object files for each architecture in their 116 | own directory. To do this, you can use GNU `make'. `cd' to the 117 | directory where you want the object files and executables to go and run 118 | the `configure' script. `configure' automatically checks for the 119 | source code in the directory that `configure' is in and in `..'. This 120 | is known as a "VPATH" build. 121 | 122 | With a non-GNU `make', it is safer to compile the package for one 123 | architecture at a time in the source code directory. After you have 124 | installed the package for one architecture, use `make distclean' before 125 | reconfiguring for another architecture. 126 | 127 | On MacOS X 10.5 and later systems, you can create libraries and 128 | executables that work on multiple system types--known as "fat" or 129 | "universal" binaries--by specifying multiple `-arch' options to the 130 | compiler but only a single `-arch' option to the preprocessor. Like 131 | this: 132 | 133 | ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134 | CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135 | CPP="gcc -E" CXXCPP="g++ -E" 136 | 137 | This is not guaranteed to produce working output in all cases, you 138 | may have to build one architecture at a time and combine the results 139 | using the `lipo' tool if you have problems. 140 | 141 | Installation Names 142 | ================== 143 | 144 | By default, `make install' installs the package's commands under 145 | `/usr/local/bin', include files under `/usr/local/include', etc. You 146 | can specify an installation prefix other than `/usr/local' by giving 147 | `configure' the option `--prefix=PREFIX', where PREFIX must be an 148 | absolute file name. 149 | 150 | You can specify separate installation prefixes for 151 | architecture-specific files and architecture-independent files. If you 152 | pass the option `--exec-prefix=PREFIX' to `configure', the package uses 153 | PREFIX as the prefix for installing programs and libraries. 154 | Documentation and other data files still use the regular prefix. 155 | 156 | In addition, if you use an unusual directory layout you can give 157 | options like `--bindir=DIR' to specify different values for particular 158 | kinds of files. Run `configure --help' for a list of the directories 159 | you can set and what kinds of files go in them. In general, the 160 | default for these options is expressed in terms of `${prefix}', so that 161 | specifying just `--prefix' will affect all of the other directory 162 | specifications that were not explicitly provided. 163 | 164 | The most portable way to affect installation locations is to pass the 165 | correct locations to `configure'; however, many packages provide one or 166 | both of the following shortcuts of passing variable assignments to the 167 | `make install' command line to change installation locations without 168 | having to reconfigure or recompile. 169 | 170 | The first method involves providing an override variable for each 171 | affected directory. For example, `make install 172 | prefix=/alternate/directory' will choose an alternate location for all 173 | directory configuration variables that were expressed in terms of 174 | `${prefix}'. Any directories that were specified during `configure', 175 | but not in terms of `${prefix}', must each be overridden at install 176 | time for the entire installation to be relocated. The approach of 177 | makefile variable overrides for each directory variable is required by 178 | the GNU Coding Standards, and ideally causes no recompilation. 179 | However, some platforms have known limitations with the semantics of 180 | shared libraries that end up requiring recompilation when using this 181 | method, particularly noticeable in packages that use GNU Libtool. 182 | 183 | The second method involves providing the `DESTDIR' variable. For 184 | example, `make install DESTDIR=/alternate/directory' will prepend 185 | `/alternate/directory' before all installation names. The approach of 186 | `DESTDIR' overrides is not required by the GNU Coding Standards, and 187 | does not work on platforms that have drive letters. On the other hand, 188 | it does better at avoiding recompilation issues, and works well even 189 | when some directory options were not specified in terms of `${prefix}' 190 | at `configure' time. 191 | 192 | Optional Features 193 | ================= 194 | 195 | If the package supports it, you can cause programs to be installed 196 | with an extra prefix or suffix on their names by giving `configure' the 197 | option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198 | 199 | Some packages pay attention to `--enable-FEATURE' options to 200 | `configure', where FEATURE indicates an optional part of the package. 201 | They may also pay attention to `--with-PACKAGE' options, where PACKAGE 202 | is something like `gnu-as' or `x' (for the X Window System). The 203 | `README' should mention any `--enable-' and `--with-' options that the 204 | package recognizes. 205 | 206 | For packages that use the X Window System, `configure' can usually 207 | find the X include and library files automatically, but if it doesn't, 208 | you can use the `configure' options `--x-includes=DIR' and 209 | `--x-libraries=DIR' to specify their locations. 210 | 211 | Some packages offer the ability to configure how verbose the 212 | execution of `make' will be. For these packages, running `./configure 213 | --enable-silent-rules' sets the default to minimal output, which can be 214 | overridden with `make V=1'; while running `./configure 215 | --disable-silent-rules' sets the default to verbose, which can be 216 | overridden with `make V=0'. 217 | 218 | Particular systems 219 | ================== 220 | 221 | On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222 | CC is not installed, it is recommended to use the following options in 223 | order to use an ANSI C compiler: 224 | 225 | ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226 | 227 | and if that doesn't work, install pre-built binaries of GCC for HP-UX. 228 | 229 | On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 230 | parse its `' header file. The option `-nodtk' can be used as 231 | a workaround. If GNU CC is not installed, it is therefore recommended 232 | to try 233 | 234 | ./configure CC="cc" 235 | 236 | and if that doesn't work, try 237 | 238 | ./configure CC="cc -nodtk" 239 | 240 | On Solaris, don't put `/usr/ucb' early in your `PATH'. This 241 | directory contains several dysfunctional programs; working variants of 242 | these programs are available in `/usr/bin'. So, if you need `/usr/ucb' 243 | in your `PATH', put it _after_ `/usr/bin'. 244 | 245 | On Haiku, software installed for all users goes in `/boot/common', 246 | not `/usr/local'. It is recommended to use the following options: 247 | 248 | ./configure --prefix=/boot/common 249 | 250 | Specifying the System Type 251 | ========================== 252 | 253 | There may be some features `configure' cannot figure out 254 | automatically, but needs to determine by the type of machine the package 255 | will run on. Usually, assuming the package is built to be run on the 256 | _same_ architectures, `configure' can figure that out, but if it prints 257 | a message saying it cannot guess the machine type, give it the 258 | `--build=TYPE' option. TYPE can either be a short name for the system 259 | type, such as `sun4', or a canonical name which has the form: 260 | 261 | CPU-COMPANY-SYSTEM 262 | 263 | where SYSTEM can have one of these forms: 264 | 265 | OS 266 | KERNEL-OS 267 | 268 | See the file `config.sub' for the possible values of each field. If 269 | `config.sub' isn't included in this package, then this package doesn't 270 | need to know the machine type. 271 | 272 | If you are _building_ compiler tools for cross-compiling, you should 273 | use the option `--target=TYPE' to select the type of system they will 274 | produce code for. 275 | 276 | If you want to _use_ a cross compiler, that generates code for a 277 | platform different from the build platform, you should specify the 278 | "host" platform (i.e., that on which the generated programs will 279 | eventually be run) with `--host=TYPE'. 280 | 281 | Sharing Defaults 282 | ================ 283 | 284 | If you want to set default values for `configure' scripts to share, 285 | you can create a site shell script called `config.site' that gives 286 | default values for variables like `CC', `cache_file', and `prefix'. 287 | `configure' looks for `PREFIX/share/config.site' if it exists, then 288 | `PREFIX/etc/config.site' if it exists. Or, you can set the 289 | `CONFIG_SITE' environment variable to the location of the site script. 290 | A warning: not all `configure' scripts look for a site script. 291 | 292 | Defining Variables 293 | ================== 294 | 295 | Variables not defined in a site shell script can be set in the 296 | environment passed to `configure'. However, some packages may run 297 | configure again during the build, and the customized values of these 298 | variables may be lost. In order to avoid this problem, you should set 299 | them in the `configure' command line, using `VAR=value'. For example: 300 | 301 | ./configure CC=/usr/local2/bin/gcc 302 | 303 | causes the specified `gcc' to be used as the C compiler (unless it is 304 | overridden in the site shell script). 305 | 306 | Unfortunately, this technique does not work for `CONFIG_SHELL' due to 307 | an Autoconf bug. Until the bug is fixed you can use this workaround: 308 | 309 | CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 310 | 311 | `configure' Invocation 312 | ====================== 313 | 314 | `configure' recognizes the following options to control how it 315 | operates. 316 | 317 | `--help' 318 | `-h' 319 | Print a summary of all of the options to `configure', and exit. 320 | 321 | `--help=short' 322 | `--help=recursive' 323 | Print a summary of the options unique to this package's 324 | `configure', and exit. The `short' variant lists options used 325 | only in the top level, while the `recursive' variant lists options 326 | also present in any nested packages. 327 | 328 | `--version' 329 | `-V' 330 | Print the version of Autoconf used to generate the `configure' 331 | script, and exit. 332 | 333 | `--cache-file=FILE' 334 | Enable the cache: use and save the results of the tests in FILE, 335 | traditionally `config.cache'. FILE defaults to `/dev/null' to 336 | disable caching. 337 | 338 | `--config-cache' 339 | `-C' 340 | Alias for `--cache-file=config.cache'. 341 | 342 | `--quiet' 343 | `--silent' 344 | `-q' 345 | Do not print messages saying which checks are being made. To 346 | suppress all normal output, redirect it to `/dev/null' (any error 347 | messages will still be shown). 348 | 349 | `--srcdir=DIR' 350 | Look for the package's source code in directory DIR. Usually 351 | `configure' can determine that directory automatically. 352 | 353 | `--prefix=DIR' 354 | Use DIR as the installation prefix. *note Installation Names:: 355 | for more details, including other options available for fine-tuning 356 | the installation locations. 357 | 358 | `--no-create' 359 | `-n' 360 | Run the configure checks, but stop before creating any output 361 | files. 362 | 363 | `configure' also accepts some other, not widely useful, options. Run 364 | `configure --help' for more details. 365 | 366 | -------------------------------------------------------------------------------- /src/Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.11.1 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 5 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, 6 | # Inc. 7 | # This Makefile.in is free software; the Free Software Foundation 8 | # gives unlimited permission to copy and/or distribute it, 9 | # with or without modifications, as long as this notice is preserved. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 13 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 14 | # PARTICULAR PURPOSE. 15 | 16 | @SET_MAKE@ 17 | 18 | VPATH = @srcdir@ 19 | pkgdatadir = $(datadir)/@PACKAGE@ 20 | pkgincludedir = $(includedir)/@PACKAGE@ 21 | pkglibdir = $(libdir)/@PACKAGE@ 22 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 23 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 24 | install_sh_DATA = $(install_sh) -c -m 644 25 | install_sh_PROGRAM = $(install_sh) -c 26 | install_sh_SCRIPT = $(install_sh) -c 27 | INSTALL_HEADER = $(INSTALL_DATA) 28 | transform = $(program_transform_name) 29 | NORMAL_INSTALL = : 30 | PRE_INSTALL = : 31 | POST_INSTALL = : 32 | NORMAL_UNINSTALL = : 33 | PRE_UNINSTALL = : 34 | POST_UNINSTALL = : 35 | build_triplet = @build@ 36 | host_triplet = @host@ 37 | target_triplet = @target@ 38 | bin_PROGRAMS = s3fs$(EXEEXT) 39 | subdir = src 40 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in 41 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 42 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 43 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 44 | $(ACLOCAL_M4) 45 | mkinstalldirs = $(install_sh) -d 46 | CONFIG_CLEAN_FILES = 47 | CONFIG_CLEAN_VPATH_FILES = 48 | am__installdirs = "$(DESTDIR)$(bindir)" 49 | PROGRAMS = $(bin_PROGRAMS) 50 | am_s3fs_OBJECTS = s3fs.$(OBJEXT) curl.$(OBJEXT) cache.$(OBJEXT) \ 51 | string_util.$(OBJEXT) 52 | s3fs_OBJECTS = $(am_s3fs_OBJECTS) 53 | am__DEPENDENCIES_1 = 54 | s3fs_DEPENDENCIES = $(am__DEPENDENCIES_1) 55 | DEFAULT_INCLUDES = -I.@am__isrc@ 56 | depcomp = $(SHELL) $(top_srcdir)/depcomp 57 | am__depfiles_maybe = depfiles 58 | am__mv = mv -f 59 | CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 60 | $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 61 | CXXLD = $(CXX) 62 | CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ 63 | -o $@ 64 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 65 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 66 | CCLD = $(CC) 67 | LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 68 | SOURCES = $(s3fs_SOURCES) 69 | DIST_SOURCES = $(s3fs_SOURCES) 70 | ETAGS = etags 71 | CTAGS = ctags 72 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 73 | ACLOCAL = @ACLOCAL@ 74 | AMTAR = @AMTAR@ 75 | AUTOCONF = @AUTOCONF@ 76 | AUTOHEADER = @AUTOHEADER@ 77 | AUTOMAKE = @AUTOMAKE@ 78 | AWK = @AWK@ 79 | CPPFLAGS = @CPPFLAGS@ 80 | CXX = @CXX@ 81 | CXXDEPMODE = @CXXDEPMODE@ 82 | CXXFLAGS = @CXXFLAGS@ 83 | CYGPATH_W = @CYGPATH_W@ 84 | DEFS = @DEFS@ 85 | DEPDIR = @DEPDIR@ 86 | DEPS_CFLAGS = @DEPS_CFLAGS@ 87 | DEPS_LIBS = @DEPS_LIBS@ 88 | ECHO_C = @ECHO_C@ 89 | ECHO_N = @ECHO_N@ 90 | ECHO_T = @ECHO_T@ 91 | EXEEXT = @EXEEXT@ 92 | INSTALL = @INSTALL@ 93 | INSTALL_DATA = @INSTALL_DATA@ 94 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 95 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 96 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 97 | LDFLAGS = @LDFLAGS@ 98 | LIBOBJS = @LIBOBJS@ 99 | LIBS = @LIBS@ 100 | LTLIBOBJS = @LTLIBOBJS@ 101 | MAKEINFO = @MAKEINFO@ 102 | MKDIR_P = @MKDIR_P@ 103 | OBJEXT = @OBJEXT@ 104 | PACKAGE = @PACKAGE@ 105 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 106 | PACKAGE_NAME = @PACKAGE_NAME@ 107 | PACKAGE_STRING = @PACKAGE_STRING@ 108 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 109 | PACKAGE_URL = @PACKAGE_URL@ 110 | PACKAGE_VERSION = @PACKAGE_VERSION@ 111 | PATH_SEPARATOR = @PATH_SEPARATOR@ 112 | PKG_CONFIG = @PKG_CONFIG@ 113 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ 114 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ 115 | SET_MAKE = @SET_MAKE@ 116 | SHELL = @SHELL@ 117 | STRIP = @STRIP@ 118 | VERSION = @VERSION@ 119 | abs_builddir = @abs_builddir@ 120 | abs_srcdir = @abs_srcdir@ 121 | abs_top_builddir = @abs_top_builddir@ 122 | abs_top_srcdir = @abs_top_srcdir@ 123 | ac_ct_CXX = @ac_ct_CXX@ 124 | am__include = @am__include@ 125 | am__leading_dot = @am__leading_dot@ 126 | am__quote = @am__quote@ 127 | am__tar = @am__tar@ 128 | am__untar = @am__untar@ 129 | bindir = @bindir@ 130 | build = @build@ 131 | build_alias = @build_alias@ 132 | build_cpu = @build_cpu@ 133 | build_os = @build_os@ 134 | build_vendor = @build_vendor@ 135 | builddir = @builddir@ 136 | datadir = @datadir@ 137 | datarootdir = @datarootdir@ 138 | docdir = @docdir@ 139 | dvidir = @dvidir@ 140 | exec_prefix = @exec_prefix@ 141 | host = @host@ 142 | host_alias = @host_alias@ 143 | host_cpu = @host_cpu@ 144 | host_os = @host_os@ 145 | host_vendor = @host_vendor@ 146 | htmldir = @htmldir@ 147 | includedir = @includedir@ 148 | infodir = @infodir@ 149 | install_sh = @install_sh@ 150 | libdir = @libdir@ 151 | libexecdir = @libexecdir@ 152 | localedir = @localedir@ 153 | localstatedir = @localstatedir@ 154 | mandir = @mandir@ 155 | mkdir_p = @mkdir_p@ 156 | oldincludedir = @oldincludedir@ 157 | pdfdir = @pdfdir@ 158 | prefix = @prefix@ 159 | program_transform_name = @program_transform_name@ 160 | psdir = @psdir@ 161 | sbindir = @sbindir@ 162 | sharedstatedir = @sharedstatedir@ 163 | srcdir = @srcdir@ 164 | sysconfdir = @sysconfdir@ 165 | target = @target@ 166 | target_alias = @target_alias@ 167 | target_cpu = @target_cpu@ 168 | target_os = @target_os@ 169 | target_vendor = @target_vendor@ 170 | top_build_prefix = @top_build_prefix@ 171 | top_builddir = @top_builddir@ 172 | top_srcdir = @top_srcdir@ 173 | AM_CPPFLAGS = $(DEPS_CFLAGS) 174 | s3fs_SOURCES = s3fs.cpp s3fs.h curl.cpp curl.h cache.cpp cache.h string_util.cpp string_util.h 175 | s3fs_LDADD = $(DEPS_LIBS) 176 | all: all-am 177 | 178 | .SUFFIXES: 179 | .SUFFIXES: .cpp .o .obj 180 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 181 | @for dep in $?; do \ 182 | case '$(am__configure_deps)' in \ 183 | *$$dep*) \ 184 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ 185 | && { if test -f $@; then exit 0; else break; fi; }; \ 186 | exit 1;; \ 187 | esac; \ 188 | done; \ 189 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ 190 | $(am__cd) $(top_srcdir) && \ 191 | $(AUTOMAKE) --gnu src/Makefile 192 | .PRECIOUS: Makefile 193 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 194 | @case '$?' in \ 195 | *config.status*) \ 196 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ 197 | *) \ 198 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ 199 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 200 | esac; 201 | 202 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 203 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 204 | 205 | $(top_srcdir)/configure: $(am__configure_deps) 206 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 207 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) 208 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 209 | $(am__aclocal_m4_deps): 210 | install-binPROGRAMS: $(bin_PROGRAMS) 211 | @$(NORMAL_INSTALL) 212 | test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" 213 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 214 | for p in $$list; do echo "$$p $$p"; done | \ 215 | sed 's/$(EXEEXT)$$//' | \ 216 | while read p p1; do if test -f $$p; \ 217 | then echo "$$p"; echo "$$p"; else :; fi; \ 218 | done | \ 219 | sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ 220 | -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ 221 | sed 'N;N;N;s,\n, ,g' | \ 222 | $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ 223 | { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ 224 | if ($$2 == $$4) files[d] = files[d] " " $$1; \ 225 | else { print "f", $$3 "/" $$4, $$1; } } \ 226 | END { for (d in files) print "f", d, files[d] }' | \ 227 | while read type dir files; do \ 228 | if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ 229 | test -z "$$files" || { \ 230 | echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ 231 | $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ 232 | } \ 233 | ; done 234 | 235 | uninstall-binPROGRAMS: 236 | @$(NORMAL_UNINSTALL) 237 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 238 | files=`for p in $$list; do echo "$$p"; done | \ 239 | sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ 240 | -e 's/$$/$(EXEEXT)/' `; \ 241 | test -n "$$list" || exit 0; \ 242 | echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ 243 | cd "$(DESTDIR)$(bindir)" && rm -f $$files 244 | 245 | clean-binPROGRAMS: 246 | -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) 247 | s3fs$(EXEEXT): $(s3fs_OBJECTS) $(s3fs_DEPENDENCIES) 248 | @rm -f s3fs$(EXEEXT) 249 | $(CXXLINK) $(s3fs_OBJECTS) $(s3fs_LDADD) $(LIBS) 250 | 251 | mostlyclean-compile: 252 | -rm -f *.$(OBJEXT) 253 | 254 | distclean-compile: 255 | -rm -f *.tab.c 256 | 257 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cache.Po@am__quote@ 258 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl.Po@am__quote@ 259 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s3fs.Po@am__quote@ 260 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/string_util.Po@am__quote@ 261 | 262 | .cpp.o: 263 | @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< 264 | @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 265 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 266 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 267 | @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< 268 | 269 | .cpp.obj: 270 | @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` 271 | @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 272 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 273 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 274 | @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 275 | 276 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) 277 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ 278 | unique=`for i in $$list; do \ 279 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 280 | done | \ 281 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 282 | END { if (nonempty) { for (i in files) print i; }; }'`; \ 283 | mkid -fID $$unique 284 | tags: TAGS 285 | 286 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 287 | $(TAGS_FILES) $(LISP) 288 | set x; \ 289 | here=`pwd`; \ 290 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ 291 | unique=`for i in $$list; do \ 292 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 293 | done | \ 294 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 295 | END { if (nonempty) { for (i in files) print i; }; }'`; \ 296 | shift; \ 297 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ 298 | test -n "$$unique" || unique=$$empty_fix; \ 299 | if test $$# -gt 0; then \ 300 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 301 | "$$@" $$unique; \ 302 | else \ 303 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 304 | $$unique; \ 305 | fi; \ 306 | fi 307 | ctags: CTAGS 308 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 309 | $(TAGS_FILES) $(LISP) 310 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ 311 | unique=`for i in $$list; do \ 312 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 313 | done | \ 314 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 315 | END { if (nonempty) { for (i in files) print i; }; }'`; \ 316 | test -z "$(CTAGS_ARGS)$$unique" \ 317 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ 318 | $$unique 319 | 320 | GTAGS: 321 | here=`$(am__cd) $(top_builddir) && pwd` \ 322 | && $(am__cd) $(top_srcdir) \ 323 | && gtags -i $(GTAGS_ARGS) "$$here" 324 | 325 | distclean-tags: 326 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 327 | 328 | distdir: $(DISTFILES) 329 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 330 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 331 | list='$(DISTFILES)'; \ 332 | dist_files=`for file in $$list; do echo $$file; done | \ 333 | sed -e "s|^$$srcdirstrip/||;t" \ 334 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 335 | case $$dist_files in \ 336 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 337 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 338 | sort -u` ;; \ 339 | esac; \ 340 | for file in $$dist_files; do \ 341 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 342 | if test -d $$d/$$file; then \ 343 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 344 | if test -d "$(distdir)/$$file"; then \ 345 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 346 | fi; \ 347 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 348 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 349 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 350 | fi; \ 351 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 352 | else \ 353 | test -f "$(distdir)/$$file" \ 354 | || cp -p $$d/$$file "$(distdir)/$$file" \ 355 | || exit 1; \ 356 | fi; \ 357 | done 358 | check-am: all-am 359 | check: check-am 360 | all-am: Makefile $(PROGRAMS) 361 | installdirs: 362 | for dir in "$(DESTDIR)$(bindir)"; do \ 363 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 364 | done 365 | install: install-am 366 | install-exec: install-exec-am 367 | install-data: install-data-am 368 | uninstall: uninstall-am 369 | 370 | install-am: all-am 371 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 372 | 373 | installcheck: installcheck-am 374 | install-strip: 375 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 376 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 377 | `test -z '$(STRIP)' || \ 378 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 379 | mostlyclean-generic: 380 | 381 | clean-generic: 382 | 383 | distclean-generic: 384 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 385 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 386 | 387 | maintainer-clean-generic: 388 | @echo "This command is intended for maintainers to use" 389 | @echo "it deletes files that may require special tools to rebuild." 390 | clean: clean-am 391 | 392 | clean-am: clean-binPROGRAMS clean-generic mostlyclean-am 393 | 394 | distclean: distclean-am 395 | -rm -rf ./$(DEPDIR) 396 | -rm -f Makefile 397 | distclean-am: clean-am distclean-compile distclean-generic \ 398 | distclean-tags 399 | 400 | dvi: dvi-am 401 | 402 | dvi-am: 403 | 404 | html: html-am 405 | 406 | html-am: 407 | 408 | info: info-am 409 | 410 | info-am: 411 | 412 | install-data-am: 413 | 414 | install-dvi: install-dvi-am 415 | 416 | install-dvi-am: 417 | 418 | install-exec-am: install-binPROGRAMS 419 | 420 | install-html: install-html-am 421 | 422 | install-html-am: 423 | 424 | install-info: install-info-am 425 | 426 | install-info-am: 427 | 428 | install-man: 429 | 430 | install-pdf: install-pdf-am 431 | 432 | install-pdf-am: 433 | 434 | install-ps: install-ps-am 435 | 436 | install-ps-am: 437 | 438 | installcheck-am: 439 | 440 | maintainer-clean: maintainer-clean-am 441 | -rm -rf ./$(DEPDIR) 442 | -rm -f Makefile 443 | maintainer-clean-am: distclean-am maintainer-clean-generic 444 | 445 | mostlyclean: mostlyclean-am 446 | 447 | mostlyclean-am: mostlyclean-compile mostlyclean-generic 448 | 449 | pdf: pdf-am 450 | 451 | pdf-am: 452 | 453 | ps: ps-am 454 | 455 | ps-am: 456 | 457 | uninstall-am: uninstall-binPROGRAMS 458 | 459 | .MAKE: install-am install-strip 460 | 461 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ 462 | clean-generic ctags distclean distclean-compile \ 463 | distclean-generic distclean-tags distdir dvi dvi-am html \ 464 | html-am info info-am install install-am install-binPROGRAMS \ 465 | install-data install-data-am install-dvi install-dvi-am \ 466 | install-exec install-exec-am install-html install-html-am \ 467 | install-info install-info-am install-man install-pdf \ 468 | install-pdf-am install-ps install-ps-am install-strip \ 469 | installcheck installcheck-am installdirs maintainer-clean \ 470 | maintainer-clean-generic mostlyclean mostlyclean-compile \ 471 | mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ 472 | uninstall-am uninstall-binPROGRAMS 473 | 474 | 475 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 476 | # Otherwise a system limit (for SysV at least) may be exceeded. 477 | .NOEXPORT: 478 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /depcomp: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # depcomp - compile a program generating dependencies as side-effects 3 | 4 | scriptversion=2009-04-28.21; # UTC 5 | 6 | # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free 7 | # Software Foundation, Inc. 8 | 9 | # This program is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 2, or (at your option) 12 | # any later version. 13 | 14 | # This program is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program. If not, see . 21 | 22 | # As a special exception to the GNU General Public License, if you 23 | # distribute this file as part of a program that contains a 24 | # configuration script generated by Autoconf, you may include it under 25 | # the same distribution terms that you use for the rest of that program. 26 | 27 | # Originally written by Alexandre Oliva . 28 | 29 | case $1 in 30 | '') 31 | echo "$0: No command. Try \`$0 --help' for more information." 1>&2 32 | exit 1; 33 | ;; 34 | -h | --h*) 35 | cat <<\EOF 36 | Usage: depcomp [--help] [--version] PROGRAM [ARGS] 37 | 38 | Run PROGRAMS ARGS to compile a file, generating dependencies 39 | as side-effects. 40 | 41 | Environment variables: 42 | depmode Dependency tracking mode. 43 | source Source file read by `PROGRAMS ARGS'. 44 | object Object file output by `PROGRAMS ARGS'. 45 | DEPDIR directory where to store dependencies. 46 | depfile Dependency file to output. 47 | tmpdepfile Temporary file to use when outputing dependencies. 48 | libtool Whether libtool is used (yes/no). 49 | 50 | Report bugs to . 51 | EOF 52 | exit $? 53 | ;; 54 | -v | --v*) 55 | echo "depcomp $scriptversion" 56 | exit $? 57 | ;; 58 | esac 59 | 60 | if test -z "$depmode" || test -z "$source" || test -z "$object"; then 61 | echo "depcomp: Variables source, object and depmode must be set" 1>&2 62 | exit 1 63 | fi 64 | 65 | # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. 66 | depfile=${depfile-`echo "$object" | 67 | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} 68 | tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} 69 | 70 | rm -f "$tmpdepfile" 71 | 72 | # Some modes work just like other modes, but use different flags. We 73 | # parameterize here, but still list the modes in the big case below, 74 | # to make depend.m4 easier to write. Note that we *cannot* use a case 75 | # here, because this file can only contain one case statement. 76 | if test "$depmode" = hp; then 77 | # HP compiler uses -M and no extra arg. 78 | gccflag=-M 79 | depmode=gcc 80 | fi 81 | 82 | if test "$depmode" = dashXmstdout; then 83 | # This is just like dashmstdout with a different argument. 84 | dashmflag=-xM 85 | depmode=dashmstdout 86 | fi 87 | 88 | cygpath_u="cygpath -u -f -" 89 | if test "$depmode" = msvcmsys; then 90 | # This is just like msvisualcpp but w/o cygpath translation. 91 | # Just convert the backslash-escaped backslashes to single forward 92 | # slashes to satisfy depend.m4 93 | cygpath_u="sed s,\\\\\\\\,/,g" 94 | depmode=msvisualcpp 95 | fi 96 | 97 | case "$depmode" in 98 | gcc3) 99 | ## gcc 3 implements dependency tracking that does exactly what 100 | ## we want. Yay! Note: for some reason libtool 1.4 doesn't like 101 | ## it if -MD -MP comes after the -MF stuff. Hmm. 102 | ## Unfortunately, FreeBSD c89 acceptance of flags depends upon 103 | ## the command line argument order; so add the flags where they 104 | ## appear in depend2.am. Note that the slowdown incurred here 105 | ## affects only configure: in makefiles, %FASTDEP% shortcuts this. 106 | for arg 107 | do 108 | case $arg in 109 | -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; 110 | *) set fnord "$@" "$arg" ;; 111 | esac 112 | shift # fnord 113 | shift # $arg 114 | done 115 | "$@" 116 | stat=$? 117 | if test $stat -eq 0; then : 118 | else 119 | rm -f "$tmpdepfile" 120 | exit $stat 121 | fi 122 | mv "$tmpdepfile" "$depfile" 123 | ;; 124 | 125 | gcc) 126 | ## There are various ways to get dependency output from gcc. Here's 127 | ## why we pick this rather obscure method: 128 | ## - Don't want to use -MD because we'd like the dependencies to end 129 | ## up in a subdir. Having to rename by hand is ugly. 130 | ## (We might end up doing this anyway to support other compilers.) 131 | ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like 132 | ## -MM, not -M (despite what the docs say). 133 | ## - Using -M directly means running the compiler twice (even worse 134 | ## than renaming). 135 | if test -z "$gccflag"; then 136 | gccflag=-MD, 137 | fi 138 | "$@" -Wp,"$gccflag$tmpdepfile" 139 | stat=$? 140 | if test $stat -eq 0; then : 141 | else 142 | rm -f "$tmpdepfile" 143 | exit $stat 144 | fi 145 | rm -f "$depfile" 146 | echo "$object : \\" > "$depfile" 147 | alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 148 | ## The second -e expression handles DOS-style file names with drive letters. 149 | sed -e 's/^[^:]*: / /' \ 150 | -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" 151 | ## This next piece of magic avoids the `deleted header file' problem. 152 | ## The problem is that when a header file which appears in a .P file 153 | ## is deleted, the dependency causes make to die (because there is 154 | ## typically no way to rebuild the header). We avoid this by adding 155 | ## dummy dependencies for each header file. Too bad gcc doesn't do 156 | ## this for us directly. 157 | tr ' ' ' 158 | ' < "$tmpdepfile" | 159 | ## Some versions of gcc put a space before the `:'. On the theory 160 | ## that the space means something, we add a space to the output as 161 | ## well. 162 | ## Some versions of the HPUX 10.20 sed can't process this invocation 163 | ## correctly. Breaking it into two sed invocations is a workaround. 164 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" 165 | rm -f "$tmpdepfile" 166 | ;; 167 | 168 | hp) 169 | # This case exists only to let depend.m4 do its work. It works by 170 | # looking at the text of this script. This case will never be run, 171 | # since it is checked for above. 172 | exit 1 173 | ;; 174 | 175 | sgi) 176 | if test "$libtool" = yes; then 177 | "$@" "-Wp,-MDupdate,$tmpdepfile" 178 | else 179 | "$@" -MDupdate "$tmpdepfile" 180 | fi 181 | stat=$? 182 | if test $stat -eq 0; then : 183 | else 184 | rm -f "$tmpdepfile" 185 | exit $stat 186 | fi 187 | rm -f "$depfile" 188 | 189 | if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files 190 | echo "$object : \\" > "$depfile" 191 | 192 | # Clip off the initial element (the dependent). Don't try to be 193 | # clever and replace this with sed code, as IRIX sed won't handle 194 | # lines with more than a fixed number of characters (4096 in 195 | # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; 196 | # the IRIX cc adds comments like `#:fec' to the end of the 197 | # dependency line. 198 | tr ' ' ' 199 | ' < "$tmpdepfile" \ 200 | | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ 201 | tr ' 202 | ' ' ' >> "$depfile" 203 | echo >> "$depfile" 204 | 205 | # The second pass generates a dummy entry for each header file. 206 | tr ' ' ' 207 | ' < "$tmpdepfile" \ 208 | | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ 209 | >> "$depfile" 210 | else 211 | # The sourcefile does not contain any dependencies, so just 212 | # store a dummy comment line, to avoid errors with the Makefile 213 | # "include basename.Plo" scheme. 214 | echo "#dummy" > "$depfile" 215 | fi 216 | rm -f "$tmpdepfile" 217 | ;; 218 | 219 | aix) 220 | # The C for AIX Compiler uses -M and outputs the dependencies 221 | # in a .u file. In older versions, this file always lives in the 222 | # current directory. Also, the AIX compiler puts `$object:' at the 223 | # start of each line; $object doesn't have directory information. 224 | # Version 6 uses the directory in both cases. 225 | dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` 226 | test "x$dir" = "x$object" && dir= 227 | base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` 228 | if test "$libtool" = yes; then 229 | tmpdepfile1=$dir$base.u 230 | tmpdepfile2=$base.u 231 | tmpdepfile3=$dir.libs/$base.u 232 | "$@" -Wc,-M 233 | else 234 | tmpdepfile1=$dir$base.u 235 | tmpdepfile2=$dir$base.u 236 | tmpdepfile3=$dir$base.u 237 | "$@" -M 238 | fi 239 | stat=$? 240 | 241 | if test $stat -eq 0; then : 242 | else 243 | rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" 244 | exit $stat 245 | fi 246 | 247 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" 248 | do 249 | test -f "$tmpdepfile" && break 250 | done 251 | if test -f "$tmpdepfile"; then 252 | # Each line is of the form `foo.o: dependent.h'. 253 | # Do two passes, one to just change these to 254 | # `$object: dependent.h' and one to simply `dependent.h:'. 255 | sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" 256 | # That's a tab and a space in the []. 257 | sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" 258 | else 259 | # The sourcefile does not contain any dependencies, so just 260 | # store a dummy comment line, to avoid errors with the Makefile 261 | # "include basename.Plo" scheme. 262 | echo "#dummy" > "$depfile" 263 | fi 264 | rm -f "$tmpdepfile" 265 | ;; 266 | 267 | icc) 268 | # Intel's C compiler understands `-MD -MF file'. However on 269 | # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c 270 | # ICC 7.0 will fill foo.d with something like 271 | # foo.o: sub/foo.c 272 | # foo.o: sub/foo.h 273 | # which is wrong. We want: 274 | # sub/foo.o: sub/foo.c 275 | # sub/foo.o: sub/foo.h 276 | # sub/foo.c: 277 | # sub/foo.h: 278 | # ICC 7.1 will output 279 | # foo.o: sub/foo.c sub/foo.h 280 | # and will wrap long lines using \ : 281 | # foo.o: sub/foo.c ... \ 282 | # sub/foo.h ... \ 283 | # ... 284 | 285 | "$@" -MD -MF "$tmpdepfile" 286 | stat=$? 287 | if test $stat -eq 0; then : 288 | else 289 | rm -f "$tmpdepfile" 290 | exit $stat 291 | fi 292 | rm -f "$depfile" 293 | # Each line is of the form `foo.o: dependent.h', 294 | # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. 295 | # Do two passes, one to just change these to 296 | # `$object: dependent.h' and one to simply `dependent.h:'. 297 | sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" 298 | # Some versions of the HPUX 10.20 sed can't process this invocation 299 | # correctly. Breaking it into two sed invocations is a workaround. 300 | sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | 301 | sed -e 's/$/ :/' >> "$depfile" 302 | rm -f "$tmpdepfile" 303 | ;; 304 | 305 | hp2) 306 | # The "hp" stanza above does not work with aCC (C++) and HP's ia64 307 | # compilers, which have integrated preprocessors. The correct option 308 | # to use with these is +Maked; it writes dependencies to a file named 309 | # 'foo.d', which lands next to the object file, wherever that 310 | # happens to be. 311 | # Much of this is similar to the tru64 case; see comments there. 312 | dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` 313 | test "x$dir" = "x$object" && dir= 314 | base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` 315 | if test "$libtool" = yes; then 316 | tmpdepfile1=$dir$base.d 317 | tmpdepfile2=$dir.libs/$base.d 318 | "$@" -Wc,+Maked 319 | else 320 | tmpdepfile1=$dir$base.d 321 | tmpdepfile2=$dir$base.d 322 | "$@" +Maked 323 | fi 324 | stat=$? 325 | if test $stat -eq 0; then : 326 | else 327 | rm -f "$tmpdepfile1" "$tmpdepfile2" 328 | exit $stat 329 | fi 330 | 331 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" 332 | do 333 | test -f "$tmpdepfile" && break 334 | done 335 | if test -f "$tmpdepfile"; then 336 | sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" 337 | # Add `dependent.h:' lines. 338 | sed -ne '2,${ 339 | s/^ *// 340 | s/ \\*$// 341 | s/$/:/ 342 | p 343 | }' "$tmpdepfile" >> "$depfile" 344 | else 345 | echo "#dummy" > "$depfile" 346 | fi 347 | rm -f "$tmpdepfile" "$tmpdepfile2" 348 | ;; 349 | 350 | tru64) 351 | # The Tru64 compiler uses -MD to generate dependencies as a side 352 | # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. 353 | # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put 354 | # dependencies in `foo.d' instead, so we check for that too. 355 | # Subdirectories are respected. 356 | dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` 357 | test "x$dir" = "x$object" && dir= 358 | base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` 359 | 360 | if test "$libtool" = yes; then 361 | # With Tru64 cc, shared objects can also be used to make a 362 | # static library. This mechanism is used in libtool 1.4 series to 363 | # handle both shared and static libraries in a single compilation. 364 | # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. 365 | # 366 | # With libtool 1.5 this exception was removed, and libtool now 367 | # generates 2 separate objects for the 2 libraries. These two 368 | # compilations output dependencies in $dir.libs/$base.o.d and 369 | # in $dir$base.o.d. We have to check for both files, because 370 | # one of the two compilations can be disabled. We should prefer 371 | # $dir$base.o.d over $dir.libs/$base.o.d because the latter is 372 | # automatically cleaned when .libs/ is deleted, while ignoring 373 | # the former would cause a distcleancheck panic. 374 | tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 375 | tmpdepfile2=$dir$base.o.d # libtool 1.5 376 | tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 377 | tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 378 | "$@" -Wc,-MD 379 | else 380 | tmpdepfile1=$dir$base.o.d 381 | tmpdepfile2=$dir$base.d 382 | tmpdepfile3=$dir$base.d 383 | tmpdepfile4=$dir$base.d 384 | "$@" -MD 385 | fi 386 | 387 | stat=$? 388 | if test $stat -eq 0; then : 389 | else 390 | rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" 391 | exit $stat 392 | fi 393 | 394 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" 395 | do 396 | test -f "$tmpdepfile" && break 397 | done 398 | if test -f "$tmpdepfile"; then 399 | sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" 400 | # That's a tab and a space in the []. 401 | sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" 402 | else 403 | echo "#dummy" > "$depfile" 404 | fi 405 | rm -f "$tmpdepfile" 406 | ;; 407 | 408 | #nosideeffect) 409 | # This comment above is used by automake to tell side-effect 410 | # dependency tracking mechanisms from slower ones. 411 | 412 | dashmstdout) 413 | # Important note: in order to support this mode, a compiler *must* 414 | # always write the preprocessed file to stdout, regardless of -o. 415 | "$@" || exit $? 416 | 417 | # Remove the call to Libtool. 418 | if test "$libtool" = yes; then 419 | while test "X$1" != 'X--mode=compile'; do 420 | shift 421 | done 422 | shift 423 | fi 424 | 425 | # Remove `-o $object'. 426 | IFS=" " 427 | for arg 428 | do 429 | case $arg in 430 | -o) 431 | shift 432 | ;; 433 | $object) 434 | shift 435 | ;; 436 | *) 437 | set fnord "$@" "$arg" 438 | shift # fnord 439 | shift # $arg 440 | ;; 441 | esac 442 | done 443 | 444 | test -z "$dashmflag" && dashmflag=-M 445 | # Require at least two characters before searching for `:' 446 | # in the target name. This is to cope with DOS-style filenames: 447 | # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. 448 | "$@" $dashmflag | 449 | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" 450 | rm -f "$depfile" 451 | cat < "$tmpdepfile" > "$depfile" 452 | tr ' ' ' 453 | ' < "$tmpdepfile" | \ 454 | ## Some versions of the HPUX 10.20 sed can't process this invocation 455 | ## correctly. Breaking it into two sed invocations is a workaround. 456 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" 457 | rm -f "$tmpdepfile" 458 | ;; 459 | 460 | dashXmstdout) 461 | # This case only exists to satisfy depend.m4. It is never actually 462 | # run, as this mode is specially recognized in the preamble. 463 | exit 1 464 | ;; 465 | 466 | makedepend) 467 | "$@" || exit $? 468 | # Remove any Libtool call 469 | if test "$libtool" = yes; then 470 | while test "X$1" != 'X--mode=compile'; do 471 | shift 472 | done 473 | shift 474 | fi 475 | # X makedepend 476 | shift 477 | cleared=no eat=no 478 | for arg 479 | do 480 | case $cleared in 481 | no) 482 | set ""; shift 483 | cleared=yes ;; 484 | esac 485 | if test $eat = yes; then 486 | eat=no 487 | continue 488 | fi 489 | case "$arg" in 490 | -D*|-I*) 491 | set fnord "$@" "$arg"; shift ;; 492 | # Strip any option that makedepend may not understand. Remove 493 | # the object too, otherwise makedepend will parse it as a source file. 494 | -arch) 495 | eat=yes ;; 496 | -*|$object) 497 | ;; 498 | *) 499 | set fnord "$@" "$arg"; shift ;; 500 | esac 501 | done 502 | obj_suffix=`echo "$object" | sed 's/^.*\././'` 503 | touch "$tmpdepfile" 504 | ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" 505 | rm -f "$depfile" 506 | cat < "$tmpdepfile" > "$depfile" 507 | sed '1,2d' "$tmpdepfile" | tr ' ' ' 508 | ' | \ 509 | ## Some versions of the HPUX 10.20 sed can't process this invocation 510 | ## correctly. Breaking it into two sed invocations is a workaround. 511 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" 512 | rm -f "$tmpdepfile" "$tmpdepfile".bak 513 | ;; 514 | 515 | cpp) 516 | # Important note: in order to support this mode, a compiler *must* 517 | # always write the preprocessed file to stdout. 518 | "$@" || exit $? 519 | 520 | # Remove the call to Libtool. 521 | if test "$libtool" = yes; then 522 | while test "X$1" != 'X--mode=compile'; do 523 | shift 524 | done 525 | shift 526 | fi 527 | 528 | # Remove `-o $object'. 529 | IFS=" " 530 | for arg 531 | do 532 | case $arg in 533 | -o) 534 | shift 535 | ;; 536 | $object) 537 | shift 538 | ;; 539 | *) 540 | set fnord "$@" "$arg" 541 | shift # fnord 542 | shift # $arg 543 | ;; 544 | esac 545 | done 546 | 547 | "$@" -E | 548 | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ 549 | -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | 550 | sed '$ s: \\$::' > "$tmpdepfile" 551 | rm -f "$depfile" 552 | echo "$object : \\" > "$depfile" 553 | cat < "$tmpdepfile" >> "$depfile" 554 | sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" 555 | rm -f "$tmpdepfile" 556 | ;; 557 | 558 | msvisualcpp) 559 | # Important note: in order to support this mode, a compiler *must* 560 | # always write the preprocessed file to stdout. 561 | "$@" || exit $? 562 | 563 | # Remove the call to Libtool. 564 | if test "$libtool" = yes; then 565 | while test "X$1" != 'X--mode=compile'; do 566 | shift 567 | done 568 | shift 569 | fi 570 | 571 | IFS=" " 572 | for arg 573 | do 574 | case "$arg" in 575 | -o) 576 | shift 577 | ;; 578 | $object) 579 | shift 580 | ;; 581 | "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") 582 | set fnord "$@" 583 | shift 584 | shift 585 | ;; 586 | *) 587 | set fnord "$@" "$arg" 588 | shift 589 | shift 590 | ;; 591 | esac 592 | done 593 | "$@" -E 2>/dev/null | 594 | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" 595 | rm -f "$depfile" 596 | echo "$object : \\" > "$depfile" 597 | sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" 598 | echo " " >> "$depfile" 599 | sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" 600 | rm -f "$tmpdepfile" 601 | ;; 602 | 603 | msvcmsys) 604 | # This case exists only to let depend.m4 do its work. It works by 605 | # looking at the text of this script. This case will never be run, 606 | # since it is checked for above. 607 | exit 1 608 | ;; 609 | 610 | none) 611 | exec "$@" 612 | ;; 613 | 614 | *) 615 | echo "Unknown depmode $depmode" 1>&2 616 | exit 1 617 | ;; 618 | esac 619 | 620 | exit 0 621 | 622 | # Local Variables: 623 | # mode: shell-script 624 | # sh-indentation: 2 625 | # eval: (add-hook 'write-file-hooks 'time-stamp) 626 | # time-stamp-start: "scriptversion=" 627 | # time-stamp-format: "%:y-%02m-%02d.%02H" 628 | # time-stamp-time-zone: "UTC" 629 | # time-stamp-end: "; # UTC" 630 | # End: 631 | -------------------------------------------------------------------------------- /Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.11.1 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 5 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, 6 | # Inc. 7 | # This Makefile.in is free software; the Free Software Foundation 8 | # gives unlimited permission to copy and/or distribute it, 9 | # with or without modifications, as long as this notice is preserved. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 13 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 14 | # PARTICULAR PURPOSE. 15 | 16 | @SET_MAKE@ 17 | VPATH = @srcdir@ 18 | pkgdatadir = $(datadir)/@PACKAGE@ 19 | pkgincludedir = $(includedir)/@PACKAGE@ 20 | pkglibdir = $(libdir)/@PACKAGE@ 21 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 22 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 23 | install_sh_DATA = $(install_sh) -c -m 644 24 | install_sh_PROGRAM = $(install_sh) -c 25 | install_sh_SCRIPT = $(install_sh) -c 26 | INSTALL_HEADER = $(INSTALL_DATA) 27 | transform = $(program_transform_name) 28 | NORMAL_INSTALL = : 29 | PRE_INSTALL = : 30 | POST_INSTALL = : 31 | NORMAL_UNINSTALL = : 32 | PRE_UNINSTALL = : 33 | POST_UNINSTALL = : 34 | build_triplet = @build@ 35 | host_triplet = @host@ 36 | target_triplet = @target@ 37 | subdir = . 38 | DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ 39 | $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ 40 | ChangeLog INSTALL NEWS config.guess config.sub depcomp \ 41 | install-sh missing 42 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 43 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 44 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 45 | $(ACLOCAL_M4) 46 | am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ 47 | configure.lineno config.status.lineno 48 | mkinstalldirs = $(install_sh) -d 49 | CONFIG_CLEAN_FILES = 50 | CONFIG_CLEAN_VPATH_FILES = 51 | SOURCES = 52 | DIST_SOURCES = 53 | RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ 54 | html-recursive info-recursive install-data-recursive \ 55 | install-dvi-recursive install-exec-recursive \ 56 | install-html-recursive install-info-recursive \ 57 | install-pdf-recursive install-ps-recursive install-recursive \ 58 | installcheck-recursive installdirs-recursive pdf-recursive \ 59 | ps-recursive uninstall-recursive 60 | RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ 61 | distclean-recursive maintainer-clean-recursive 62 | AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ 63 | $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ 64 | distdir dist dist-all distcheck 65 | ETAGS = etags 66 | CTAGS = ctags 67 | DIST_SUBDIRS = $(SUBDIRS) 68 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 69 | distdir = $(PACKAGE)-$(VERSION) 70 | top_distdir = $(distdir) 71 | am__remove_distdir = \ 72 | { test ! -d "$(distdir)" \ 73 | || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ 74 | && rm -fr "$(distdir)"; }; } 75 | am__relativize = \ 76 | dir0=`pwd`; \ 77 | sed_first='s,^\([^/]*\)/.*$$,\1,'; \ 78 | sed_rest='s,^[^/]*/*,,'; \ 79 | sed_last='s,^.*/\([^/]*\)$$,\1,'; \ 80 | sed_butlast='s,/*[^/]*$$,,'; \ 81 | while test -n "$$dir1"; do \ 82 | first=`echo "$$dir1" | sed -e "$$sed_first"`; \ 83 | if test "$$first" != "."; then \ 84 | if test "$$first" = ".."; then \ 85 | dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ 86 | dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ 87 | else \ 88 | first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ 89 | if test "$$first2" = "$$first"; then \ 90 | dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ 91 | else \ 92 | dir2="../$$dir2"; \ 93 | fi; \ 94 | dir0="$$dir0"/"$$first"; \ 95 | fi; \ 96 | fi; \ 97 | dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ 98 | done; \ 99 | reldir="$$dir2" 100 | DIST_ARCHIVES = $(distdir).tar.gz 101 | GZIP_ENV = --best 102 | distuninstallcheck_listfiles = find . -type f -print 103 | distcleancheck_listfiles = find . -type f -print 104 | ACLOCAL = @ACLOCAL@ 105 | AMTAR = @AMTAR@ 106 | AUTOCONF = @AUTOCONF@ 107 | AUTOHEADER = @AUTOHEADER@ 108 | AUTOMAKE = @AUTOMAKE@ 109 | AWK = @AWK@ 110 | CPPFLAGS = @CPPFLAGS@ 111 | CXX = @CXX@ 112 | CXXDEPMODE = @CXXDEPMODE@ 113 | CXXFLAGS = @CXXFLAGS@ 114 | CYGPATH_W = @CYGPATH_W@ 115 | DEFS = @DEFS@ 116 | DEPDIR = @DEPDIR@ 117 | DEPS_CFLAGS = @DEPS_CFLAGS@ 118 | DEPS_LIBS = @DEPS_LIBS@ 119 | ECHO_C = @ECHO_C@ 120 | ECHO_N = @ECHO_N@ 121 | ECHO_T = @ECHO_T@ 122 | EXEEXT = @EXEEXT@ 123 | INSTALL = @INSTALL@ 124 | INSTALL_DATA = @INSTALL_DATA@ 125 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 126 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 127 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 128 | LDFLAGS = @LDFLAGS@ 129 | LIBOBJS = @LIBOBJS@ 130 | LIBS = @LIBS@ 131 | LTLIBOBJS = @LTLIBOBJS@ 132 | MAKEINFO = @MAKEINFO@ 133 | MKDIR_P = @MKDIR_P@ 134 | OBJEXT = @OBJEXT@ 135 | PACKAGE = @PACKAGE@ 136 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 137 | PACKAGE_NAME = @PACKAGE_NAME@ 138 | PACKAGE_STRING = @PACKAGE_STRING@ 139 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 140 | PACKAGE_URL = @PACKAGE_URL@ 141 | PACKAGE_VERSION = @PACKAGE_VERSION@ 142 | PATH_SEPARATOR = @PATH_SEPARATOR@ 143 | PKG_CONFIG = @PKG_CONFIG@ 144 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ 145 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ 146 | SET_MAKE = @SET_MAKE@ 147 | SHELL = @SHELL@ 148 | STRIP = @STRIP@ 149 | VERSION = @VERSION@ 150 | abs_builddir = @abs_builddir@ 151 | abs_srcdir = @abs_srcdir@ 152 | abs_top_builddir = @abs_top_builddir@ 153 | abs_top_srcdir = @abs_top_srcdir@ 154 | ac_ct_CXX = @ac_ct_CXX@ 155 | am__include = @am__include@ 156 | am__leading_dot = @am__leading_dot@ 157 | am__quote = @am__quote@ 158 | am__tar = @am__tar@ 159 | am__untar = @am__untar@ 160 | bindir = @bindir@ 161 | build = @build@ 162 | build_alias = @build_alias@ 163 | build_cpu = @build_cpu@ 164 | build_os = @build_os@ 165 | build_vendor = @build_vendor@ 166 | builddir = @builddir@ 167 | datadir = @datadir@ 168 | datarootdir = @datarootdir@ 169 | docdir = @docdir@ 170 | dvidir = @dvidir@ 171 | exec_prefix = @exec_prefix@ 172 | host = @host@ 173 | host_alias = @host_alias@ 174 | host_cpu = @host_cpu@ 175 | host_os = @host_os@ 176 | host_vendor = @host_vendor@ 177 | htmldir = @htmldir@ 178 | includedir = @includedir@ 179 | infodir = @infodir@ 180 | install_sh = @install_sh@ 181 | libdir = @libdir@ 182 | libexecdir = @libexecdir@ 183 | localedir = @localedir@ 184 | localstatedir = @localstatedir@ 185 | mandir = @mandir@ 186 | mkdir_p = @mkdir_p@ 187 | oldincludedir = @oldincludedir@ 188 | pdfdir = @pdfdir@ 189 | prefix = @prefix@ 190 | program_transform_name = @program_transform_name@ 191 | psdir = @psdir@ 192 | sbindir = @sbindir@ 193 | sharedstatedir = @sharedstatedir@ 194 | srcdir = @srcdir@ 195 | sysconfdir = @sysconfdir@ 196 | target = @target@ 197 | target_alias = @target_alias@ 198 | target_cpu = @target_cpu@ 199 | target_os = @target_os@ 200 | target_vendor = @target_vendor@ 201 | top_build_prefix = @top_build_prefix@ 202 | top_builddir = @top_builddir@ 203 | top_srcdir = @top_srcdir@ 204 | SUBDIRS = src test doc 205 | EXTRA_DIST = doc 206 | all: all-recursive 207 | 208 | .SUFFIXES: 209 | am--refresh: 210 | @: 211 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 212 | @for dep in $?; do \ 213 | case '$(am__configure_deps)' in \ 214 | *$$dep*) \ 215 | echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ 216 | $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ 217 | && exit 0; \ 218 | exit 1;; \ 219 | esac; \ 220 | done; \ 221 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ 222 | $(am__cd) $(top_srcdir) && \ 223 | $(AUTOMAKE) --gnu Makefile 224 | .PRECIOUS: Makefile 225 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 226 | @case '$?' in \ 227 | *config.status*) \ 228 | echo ' $(SHELL) ./config.status'; \ 229 | $(SHELL) ./config.status;; \ 230 | *) \ 231 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ 232 | cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ 233 | esac; 234 | 235 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 236 | $(SHELL) ./config.status --recheck 237 | 238 | $(top_srcdir)/configure: $(am__configure_deps) 239 | $(am__cd) $(srcdir) && $(AUTOCONF) 240 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) 241 | $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) 242 | $(am__aclocal_m4_deps): 243 | 244 | # This directory's subdirectories are mostly independent; you can cd 245 | # into them and run `make' without going through this Makefile. 246 | # To change the values of `make' variables: instead of editing Makefiles, 247 | # (1) if the variable is set in `config.status', edit `config.status' 248 | # (which will cause the Makefiles to be regenerated when you run `make'); 249 | # (2) otherwise, pass the desired values on the `make' command line. 250 | $(RECURSIVE_TARGETS): 251 | @fail= failcom='exit 1'; \ 252 | for f in x $$MAKEFLAGS; do \ 253 | case $$f in \ 254 | *=* | --[!k]*);; \ 255 | *k*) failcom='fail=yes';; \ 256 | esac; \ 257 | done; \ 258 | dot_seen=no; \ 259 | target=`echo $@ | sed s/-recursive//`; \ 260 | list='$(SUBDIRS)'; for subdir in $$list; do \ 261 | echo "Making $$target in $$subdir"; \ 262 | if test "$$subdir" = "."; then \ 263 | dot_seen=yes; \ 264 | local_target="$$target-am"; \ 265 | else \ 266 | local_target="$$target"; \ 267 | fi; \ 268 | ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ 269 | || eval $$failcom; \ 270 | done; \ 271 | if test "$$dot_seen" = "no"; then \ 272 | $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ 273 | fi; test -z "$$fail" 274 | 275 | $(RECURSIVE_CLEAN_TARGETS): 276 | @fail= failcom='exit 1'; \ 277 | for f in x $$MAKEFLAGS; do \ 278 | case $$f in \ 279 | *=* | --[!k]*);; \ 280 | *k*) failcom='fail=yes';; \ 281 | esac; \ 282 | done; \ 283 | dot_seen=no; \ 284 | case "$@" in \ 285 | distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ 286 | *) list='$(SUBDIRS)' ;; \ 287 | esac; \ 288 | rev=''; for subdir in $$list; do \ 289 | if test "$$subdir" = "."; then :; else \ 290 | rev="$$subdir $$rev"; \ 291 | fi; \ 292 | done; \ 293 | rev="$$rev ."; \ 294 | target=`echo $@ | sed s/-recursive//`; \ 295 | for subdir in $$rev; do \ 296 | echo "Making $$target in $$subdir"; \ 297 | if test "$$subdir" = "."; then \ 298 | local_target="$$target-am"; \ 299 | else \ 300 | local_target="$$target"; \ 301 | fi; \ 302 | ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ 303 | || eval $$failcom; \ 304 | done && test -z "$$fail" 305 | tags-recursive: 306 | list='$(SUBDIRS)'; for subdir in $$list; do \ 307 | test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ 308 | done 309 | ctags-recursive: 310 | list='$(SUBDIRS)'; for subdir in $$list; do \ 311 | test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ 312 | done 313 | 314 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) 315 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ 316 | unique=`for i in $$list; do \ 317 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 318 | done | \ 319 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 320 | END { if (nonempty) { for (i in files) print i; }; }'`; \ 321 | mkid -fID $$unique 322 | tags: TAGS 323 | 324 | TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 325 | $(TAGS_FILES) $(LISP) 326 | set x; \ 327 | here=`pwd`; \ 328 | if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ 329 | include_option=--etags-include; \ 330 | empty_fix=.; \ 331 | else \ 332 | include_option=--include; \ 333 | empty_fix=; \ 334 | fi; \ 335 | list='$(SUBDIRS)'; for subdir in $$list; do \ 336 | if test "$$subdir" = .; then :; else \ 337 | test ! -f $$subdir/TAGS || \ 338 | set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ 339 | fi; \ 340 | done; \ 341 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ 342 | unique=`for i in $$list; do \ 343 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 344 | done | \ 345 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 346 | END { if (nonempty) { for (i in files) print i; }; }'`; \ 347 | shift; \ 348 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ 349 | test -n "$$unique" || unique=$$empty_fix; \ 350 | if test $$# -gt 0; then \ 351 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 352 | "$$@" $$unique; \ 353 | else \ 354 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 355 | $$unique; \ 356 | fi; \ 357 | fi 358 | ctags: CTAGS 359 | CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 360 | $(TAGS_FILES) $(LISP) 361 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ 362 | unique=`for i in $$list; do \ 363 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 364 | done | \ 365 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 366 | END { if (nonempty) { for (i in files) print i; }; }'`; \ 367 | test -z "$(CTAGS_ARGS)$$unique" \ 368 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ 369 | $$unique 370 | 371 | GTAGS: 372 | here=`$(am__cd) $(top_builddir) && pwd` \ 373 | && $(am__cd) $(top_srcdir) \ 374 | && gtags -i $(GTAGS_ARGS) "$$here" 375 | 376 | distclean-tags: 377 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 378 | 379 | distdir: $(DISTFILES) 380 | $(am__remove_distdir) 381 | test -d "$(distdir)" || mkdir "$(distdir)" 382 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 383 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 384 | list='$(DISTFILES)'; \ 385 | dist_files=`for file in $$list; do echo $$file; done | \ 386 | sed -e "s|^$$srcdirstrip/||;t" \ 387 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 388 | case $$dist_files in \ 389 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 390 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 391 | sort -u` ;; \ 392 | esac; \ 393 | for file in $$dist_files; do \ 394 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 395 | if test -d $$d/$$file; then \ 396 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 397 | if test -d "$(distdir)/$$file"; then \ 398 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 399 | fi; \ 400 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 401 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 402 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 403 | fi; \ 404 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 405 | else \ 406 | test -f "$(distdir)/$$file" \ 407 | || cp -p $$d/$$file "$(distdir)/$$file" \ 408 | || exit 1; \ 409 | fi; \ 410 | done 411 | @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ 412 | if test "$$subdir" = .; then :; else \ 413 | test -d "$(distdir)/$$subdir" \ 414 | || $(MKDIR_P) "$(distdir)/$$subdir" \ 415 | || exit 1; \ 416 | fi; \ 417 | done 418 | @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ 419 | if test "$$subdir" = .; then :; else \ 420 | dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ 421 | $(am__relativize); \ 422 | new_distdir=$$reldir; \ 423 | dir1=$$subdir; dir2="$(top_distdir)"; \ 424 | $(am__relativize); \ 425 | new_top_distdir=$$reldir; \ 426 | echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ 427 | echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ 428 | ($(am__cd) $$subdir && \ 429 | $(MAKE) $(AM_MAKEFLAGS) \ 430 | top_distdir="$$new_top_distdir" \ 431 | distdir="$$new_distdir" \ 432 | am__remove_distdir=: \ 433 | am__skip_length_check=: \ 434 | am__skip_mode_fix=: \ 435 | distdir) \ 436 | || exit 1; \ 437 | fi; \ 438 | done 439 | $(MAKE) $(AM_MAKEFLAGS) \ 440 | top_distdir="$(top_distdir)" distdir="$(distdir)" \ 441 | dist-hook 442 | -test -n "$(am__skip_mode_fix)" \ 443 | || find "$(distdir)" -type d ! -perm -755 \ 444 | -exec chmod u+rwx,go+rx {} \; -o \ 445 | ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ 446 | ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ 447 | ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ 448 | || chmod -R a+r "$(distdir)" 449 | dist-gzip: distdir 450 | tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz 451 | $(am__remove_distdir) 452 | 453 | dist-bzip2: distdir 454 | tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 455 | $(am__remove_distdir) 456 | 457 | dist-lzma: distdir 458 | tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma 459 | $(am__remove_distdir) 460 | 461 | dist-xz: distdir 462 | tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz 463 | $(am__remove_distdir) 464 | 465 | dist-tarZ: distdir 466 | tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z 467 | $(am__remove_distdir) 468 | 469 | dist-shar: distdir 470 | shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz 471 | $(am__remove_distdir) 472 | 473 | dist-zip: distdir 474 | -rm -f $(distdir).zip 475 | zip -rq $(distdir).zip $(distdir) 476 | $(am__remove_distdir) 477 | 478 | dist dist-all: distdir 479 | tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz 480 | $(am__remove_distdir) 481 | 482 | # This target untars the dist file and tries a VPATH configuration. Then 483 | # it guarantees that the distribution is self-contained by making another 484 | # tarfile. 485 | distcheck: dist 486 | case '$(DIST_ARCHIVES)' in \ 487 | *.tar.gz*) \ 488 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ 489 | *.tar.bz2*) \ 490 | bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ 491 | *.tar.lzma*) \ 492 | lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ 493 | *.tar.xz*) \ 494 | xz -dc $(distdir).tar.xz | $(am__untar) ;;\ 495 | *.tar.Z*) \ 496 | uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ 497 | *.shar.gz*) \ 498 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ 499 | *.zip*) \ 500 | unzip $(distdir).zip ;;\ 501 | esac 502 | chmod -R a-w $(distdir); chmod a+w $(distdir) 503 | mkdir $(distdir)/_build 504 | mkdir $(distdir)/_inst 505 | chmod a-w $(distdir) 506 | test -d $(distdir)/_build || exit 0; \ 507 | dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ 508 | && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ 509 | && am__cwd=`pwd` \ 510 | && $(am__cd) $(distdir)/_build \ 511 | && ../configure --srcdir=.. --prefix="$$dc_install_base" \ 512 | $(DISTCHECK_CONFIGURE_FLAGS) \ 513 | && $(MAKE) $(AM_MAKEFLAGS) \ 514 | && $(MAKE) $(AM_MAKEFLAGS) dvi \ 515 | && $(MAKE) $(AM_MAKEFLAGS) check \ 516 | && $(MAKE) $(AM_MAKEFLAGS) install \ 517 | && $(MAKE) $(AM_MAKEFLAGS) installcheck \ 518 | && $(MAKE) $(AM_MAKEFLAGS) uninstall \ 519 | && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ 520 | distuninstallcheck \ 521 | && chmod -R a-w "$$dc_install_base" \ 522 | && ({ \ 523 | (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ 524 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ 525 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ 526 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ 527 | distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ 528 | } || { rm -rf "$$dc_destdir"; exit 1; }) \ 529 | && rm -rf "$$dc_destdir" \ 530 | && $(MAKE) $(AM_MAKEFLAGS) dist \ 531 | && rm -rf $(DIST_ARCHIVES) \ 532 | && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ 533 | && cd "$$am__cwd" \ 534 | || exit 1 535 | $(am__remove_distdir) 536 | @(echo "$(distdir) archives ready for distribution: "; \ 537 | list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ 538 | sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' 539 | distuninstallcheck: 540 | @$(am__cd) '$(distuninstallcheck_dir)' \ 541 | && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ 542 | || { echo "ERROR: files left after uninstall:" ; \ 543 | if test -n "$(DESTDIR)"; then \ 544 | echo " (check DESTDIR support)"; \ 545 | fi ; \ 546 | $(distuninstallcheck_listfiles) ; \ 547 | exit 1; } >&2 548 | distcleancheck: distclean 549 | @if test '$(srcdir)' = . ; then \ 550 | echo "ERROR: distcleancheck can only run from a VPATH build" ; \ 551 | exit 1 ; \ 552 | fi 553 | @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ 554 | || { echo "ERROR: files left in build directory after distclean:" ; \ 555 | $(distcleancheck_listfiles) ; \ 556 | exit 1; } >&2 557 | check-am: all-am 558 | check: check-recursive 559 | all-am: Makefile 560 | installdirs: installdirs-recursive 561 | installdirs-am: 562 | install: install-recursive 563 | install-exec: install-exec-recursive 564 | install-data: install-data-recursive 565 | uninstall: uninstall-recursive 566 | 567 | install-am: all-am 568 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 569 | 570 | installcheck: installcheck-recursive 571 | install-strip: 572 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 573 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 574 | `test -z '$(STRIP)' || \ 575 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 576 | mostlyclean-generic: 577 | 578 | clean-generic: 579 | 580 | distclean-generic: 581 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 582 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 583 | 584 | maintainer-clean-generic: 585 | @echo "This command is intended for maintainers to use" 586 | @echo "it deletes files that may require special tools to rebuild." 587 | clean: clean-recursive 588 | 589 | clean-am: clean-generic mostlyclean-am 590 | 591 | distclean: distclean-recursive 592 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) 593 | -rm -f Makefile 594 | distclean-am: clean-am distclean-generic distclean-tags 595 | 596 | dvi: dvi-recursive 597 | 598 | dvi-am: 599 | 600 | html: html-recursive 601 | 602 | html-am: 603 | 604 | info: info-recursive 605 | 606 | info-am: 607 | 608 | install-data-am: 609 | 610 | install-dvi: install-dvi-recursive 611 | 612 | install-dvi-am: 613 | 614 | install-exec-am: 615 | 616 | install-html: install-html-recursive 617 | 618 | install-html-am: 619 | 620 | install-info: install-info-recursive 621 | 622 | install-info-am: 623 | 624 | install-man: 625 | 626 | install-pdf: install-pdf-recursive 627 | 628 | install-pdf-am: 629 | 630 | install-ps: install-ps-recursive 631 | 632 | install-ps-am: 633 | 634 | installcheck-am: 635 | 636 | maintainer-clean: maintainer-clean-recursive 637 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) 638 | -rm -rf $(top_srcdir)/autom4te.cache 639 | -rm -f Makefile 640 | maintainer-clean-am: distclean-am maintainer-clean-generic 641 | 642 | mostlyclean: mostlyclean-recursive 643 | 644 | mostlyclean-am: mostlyclean-generic 645 | 646 | pdf: pdf-recursive 647 | 648 | pdf-am: 649 | 650 | ps: ps-recursive 651 | 652 | ps-am: 653 | 654 | uninstall-am: 655 | 656 | .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ 657 | install-am install-strip tags-recursive 658 | 659 | .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ 660 | all all-am am--refresh check check-am clean clean-generic \ 661 | ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ 662 | dist-hook dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ 663 | distcheck distclean distclean-generic distclean-tags \ 664 | distcleancheck distdir distuninstallcheck dvi dvi-am html \ 665 | html-am info info-am install install-am install-data \ 666 | install-data-am install-dvi install-dvi-am install-exec \ 667 | install-exec-am install-html install-html-am install-info \ 668 | install-info-am install-man install-pdf install-pdf-am \ 669 | install-ps install-ps-am install-strip installcheck \ 670 | installcheck-am installdirs installdirs-am maintainer-clean \ 671 | maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ 672 | pdf-am ps ps-am tags tags-recursive uninstall uninstall-am 673 | 674 | 675 | dist-hook: 676 | rm -rf `find $(distdir)/doc -type d -name .svn` 677 | 678 | release : dist ../utils/release.sh 679 | ../utils/release.sh $(DIST_ARCHIVES) 680 | 681 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 682 | # Otherwise a system limit (for SysV at least) may be exceeded. 683 | .NOEXPORT: 684 | --------------------------------------------------------------------------------