You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2011/06/05 11:10:34 UTC
svn commit: r1132266 [3/18] - in
/incubator/mesos/trunk/third_party/libprocess: ./ third_party/glog-0.3.1/
third_party/glog-0.3.1/doc/ third_party/glog-0.3.1/m4/
third_party/glog-0.3.1/packages/ third_party/glog-0.3.1/packages/deb/
third_party/glog-0.3...
Modified: incubator/mesos/trunk/third_party/libprocess/configure.ac
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/configure.ac?rev=1132266&r1=1132265&r2=1132266&view=diff
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/configure.ac (original)
+++ incubator/mesos/trunk/third_party/libprocess/configure.ac Sun Jun 5 09:10:30 2011
@@ -33,6 +33,7 @@ AC_FUNC_SELECT_ARGTYPES
AC_CHECK_FUNCS([gethostbyname gethostname getpagesize memset select socket])
AC_CONFIG_FILES([Makefile])
+AC_CONFIG_SUBDIRS([third_party/glog-0.3.1])
AC_CONFIG_SUBDIRS([third_party/libev-3.8])
# Temporary fix so we don't build dylib's on Mac OS X.
Modified: incubator/mesos/trunk/third_party/libprocess/process.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/process.cpp?rev=1132266&r1=1132265&r2=1132266&view=diff
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/process.cpp (original)
+++ incubator/mesos/trunk/third_party/libprocess/process.cpp Sun Jun 5 09:10:30 2011
@@ -15,6 +15,8 @@
#include <arpa/inet.h>
+#include <glog/logging.h>
+
#include <netinet/in.h>
#include <netinet/tcp.h>
@@ -672,6 +674,8 @@ void recv_data(struct ev_loop *loop, ev_
break;
} else if (length <= 0) {
// Socket error ... we consider closed.
+ const char* error = strerror(errno);
+ VLOG(1) << "Socket error while receiving: " << error;
link_manager->closed(c);
delete decoder;
ev_io_stop(loop, watcher);
@@ -688,6 +692,7 @@ void recv_data(struct ev_loop *loop, ev_
process_manager->deliver(c, request);
}
} else if (requests.empty() && decoder->failed()) {
+ VLOG(1) << "Decoder error while receiving";
link_manager->closed(c);
delete decoder;
ev_io_stop(loop, watcher);
@@ -722,6 +727,8 @@ void send_data(struct ev_loop *loop, ev_
break;
} else if (length <= 0) {
// Socket closed or error ... we consider closed.
+ const char* error = strerror(errno);
+ VLOG(1) << "Socket error while sending: " << error;
link_manager->closed(c);
delete encoder;
ev_io_stop(loop, watcher);
@@ -763,6 +770,7 @@ void sending_connect(struct ev_loop *loo
if (getsockopt(c, SOL_SOCKET, SO_ERROR, &opt, &optlen) < 0 || opt != 0) {
// Connect failure.
+ VLOG(1) << "Socket error while connecting";
link_manager->closed(c);
MessageEncoder* encoder = (MessageEncoder*) watcher->data;
delete encoder;
@@ -787,6 +795,7 @@ void receiving_connect(struct ev_loop *l
if (getsockopt(c, SOL_SOCKET, SO_ERROR, &opt, &optlen) < 0 || opt != 0) {
// Connect failure.
+ VLOG(1) << "Socket error while connecting";
link_manager->closed(c);
DataDecoder* decoder = (DataDecoder*) watcher->data;
delete decoder;
@@ -1010,6 +1019,9 @@ void initialize()
}
}
+ google::InitGoogleLogging("libprocess");
+ google::LogToStderr();
+
// /* Install signal handler. */
// struct sigaction sa;
@@ -1121,8 +1133,9 @@ void initialize()
ip = addr.sin_addr.s_addr;
port = ntohs(addr.sin_port);
- if (listen(s, 500000) < 0)
+ if (listen(s, 500000) < 0) {
fatalerror("failed to initialize (listen)");
+ }
/* Setup event loop. */
#ifdef __sun__
@@ -1155,10 +1168,15 @@ void initialize()
// sigaddset (&sa.sa_mask, w->signum);
// sigprocmask (SIG_UNBLOCK, &sa.sa_mask, 0);
- if (pthread_create(&io_thread, NULL, serve, loop) != 0)
+ if (pthread_create(&io_thread, NULL, serve, loop) != 0) {
fatalerror("failed to initialize node (pthread_create)");
+ }
initializing = false;
+
+ char temp[INET_ADDRSTRLEN];
+ CHECK(inet_ntop(AF_INET, (in_addr *) &ip, temp, INET_ADDRSTRLEN) != NULL);
+ VLOG(1) << "libprocess is initialized on " << temp << ":" << port;
}
@@ -1580,6 +1598,8 @@ bool ProcessManager::deliver(int c, Http
const vector<string>& pairs = tokenize(request->path, "/");
if (pairs.size() != 2) {
// This has no receiver, send a response and cleanup.
+ VLOG(1) << "Returning '404 Not Found' for HTTP request '"
+ << request->path << "'";
link_manager->send(new HttpResponseEncoder(HttpNotFoundResponse()), c);
delete request;
return false;
@@ -1642,6 +1662,8 @@ bool ProcessManager::deliver(int c, Http
receiver->enqueue(new pair<HttpRequest*, Future<HttpResponse>*>(request, future));
} else {
// This has no receiver, send a response and cleanup.
+ VLOG(1) << "Returning '404 Not Found' for HTTP request '"
+ << request->path << "'";
link_manager->send(new HttpResponseEncoder(HttpNotFoundResponse()), c);
delete request;
return false;
@@ -2699,19 +2721,15 @@ string ProcessBase::serve(double secs, b
if ((request = dequeue<pair<HttpRequest*, Future<HttpResponse>*> >()) != NULL) {
const string& id = "/" + pid.id + "/";
size_t index = request->first->path.find(id);
- if (index != string::npos) {
- const string& name =
- request->first->path.substr(index + id.size(), request->first->path.size());
- if (http_handlers.count(name) > 0) {
- http_handlers[name](*request->first).associate(*request->second);
- } else {
- // TODO(benh): Log dropping this!
- Promise<HttpResponse>(HttpNotFoundResponse()).associate(*request->second);
- }
+ CHECK(index != string::npos);
+ const string& name =
+ request->first->path.substr(index + id.size(), request->first->path.size());
+ if (http_handlers.count(name) > 0) {
+ http_handlers[name](*request->first).associate(*request->second);
} else {
- // TODO(benh): This should never happen (because receiver gets
- // parsed in ProcessManager::deliver). Reorganize the code and
- // put an assert in or at least log dropping this!
+ Promise<HttpResponse>(HttpNotFoundResponse()).associate(*request->second);
+ VLOG(1) << "Returning '404 Not Found' for HTTP request '"
+ << request->first->path << "'";
}
delete request->first;
delete request->second;
Added: incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/AUTHORS
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/AUTHORS?rev=1132266&view=auto
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/AUTHORS (added)
+++ incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/AUTHORS Sun Jun 5 09:10:30 2011
@@ -0,0 +1,2 @@
+opensource@google.com
+
Added: incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/COPYING
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/COPYING?rev=1132266&view=auto
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/COPYING (added)
+++ incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/COPYING Sun Jun 5 09:10:30 2011
@@ -0,0 +1,65 @@
+Copyright (c) 2008, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+A function gettimeofday in utilities.cc is based on
+
+http://www.google.com/codesearch/p?hl=en#dR3YEbitojA/COPYING&q=GetSystemTimeAsFileTime%20license:bsd
+
+The license of this code is:
+
+Copyright (c) 2003-2008, Jouni Malinen <j...@w1.fi> and contributors
+All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+3. Neither the name(s) of the above-listed copyright holder(s) nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Added: incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/ChangeLog?rev=1132266&view=auto
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/ChangeLog (added)
+++ incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/ChangeLog Sun Jun 5 09:10:30 2011
@@ -0,0 +1,59 @@
+2010-06-15 Google Inc. <op...@google.com>
+
+ * google-glog: version 0.3.1
+ * GLOG_* environment variables now work even when gflags is installed.
+ * Snow leopard support.
+ * Now we can build and test from out side tree.
+ * Add DCHECK_NOTNULL.
+ * Add ShutdownGoogleLogging to close syslog (thanks DGunchev)
+ * Fix --enable-frame-pointers option (thanks kazuki.ohta)
+ * Fix libunwind detection (thanks giantchen)
+
+2009-07-30 Google Inc. <op...@google.com>
+
+ * google-glog: version 0.3.0
+ * Fix a deadlock happened when user uses glog with recent gflags.
+ * Suppress several unnecessary warnings (thanks keir).
+ * NetBSD and OpenBSD support.
+ * Use Win32API GetComputeNameA properly (thanks magila).
+ * Fix user name detection for Windows (thanks ademin).
+ * Fix several minor bugs.
+
+2009-04-10 Google Inc. <op...@google.com>
+ * google-glog: version 0.2.1
+ * Fix timestamps of VC++ version.
+ * Add pkg-config support (thanks Tomasz)
+ * Fix build problem when building with gtest (thanks Michael)
+ * Add --with-gflags option for configure (thanks Michael)
+ * Fixes for GCC 4.4 (thanks John)
+
+2009-01-23 Google Inc. <op...@google.com>
+ * google-glog: version 0.2
+ * Add initial Windows VC++ support.
+ * Google testing/mocking frameworks integration.
+ * Link pthread library automatically.
+ * Flush logs in signal handlers.
+ * Add macros LOG_TO_STRING, LOG_AT_LEVEL, DVLOG, and LOG_TO_SINK_ONLY.
+ * Log microseconds.
+ * Add --log_backtrace_at option.
+ * Fix some minor bugs.
+
+2008-11-18 Google Inc. <op...@google.com>
+ * google-glog: version 0.1.2
+ * Add InstallFailureSignalHandler(). (satorux)
+ * Re-organize the way to produce stacktraces.
+ * Don't define unnecessary macro DISALLOW_EVIL_CONSTRUCTORS.
+
+2008-10-15 Google Inc. <op...@google.com>
+ * google-glog: version 0.1.1
+ * Support symbolize for MacOSX 10.5.
+ * BUG FIX: --vmodule didn't work with gflags.
+ * BUG FIX: symbolize_unittest failed with GCC 4.3.
+ * Several fixes on the document.
+
+2008-10-07 Google Inc. <op...@google.com>
+
+ * google-glog: initial release:
+ The glog package contains a library that implements application-level
+ logging. This library provides logging APIs based on C++-style
+ streams and various helper macros.
Added: incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/INSTALL
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/INSTALL?rev=1132266&view=auto
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/INSTALL (added)
+++ incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/INSTALL Sun Jun 5 09:10:30 2011
@@ -0,0 +1,297 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007 Free Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Glog-Specific Install Notes
+================================
+
+*** NOTE FOR 64-BIT LINUX SYSTEMS
+
+The glibc built-in stack-unwinder on 64-bit systems has some problems
+with the glog libraries. (In particular, if you are using
+InstallFailureSignalHandler(), the signal may be raised in the middle
+of malloc, holding some malloc-related locks when they invoke the
+stack unwinder. The built-in stack unwinder may call malloc
+recursively, which may require the thread to acquire a lock it already
+holds: deadlock.)
+
+For that reason, if you use a 64-bit system and you need
+InstallFailureSignalHandler(), we strongly recommend you install
+libunwind before trying to configure or install google glog.
+libunwind can be found at
+
+ http://download.savannah.nongnu.org/releases/libunwind/libunwind-snap-070410.tar.gz
+
+Even if you already have libunwind installed, you will probably still
+need to install from the snapshot to get the latest version.
+
+CAUTION: if you install libunwind from the URL above, be aware that
+you may have trouble if you try to statically link your binary with
+glog: that is, if you link with 'gcc -static -lgcc_eh ...'. This
+is because both libunwind and libgcc implement the same C++ exception
+handling APIs, but they implement them differently on some platforms.
+This is not likely to be a problem on ia64, but may be on x86-64.
+
+Also, if you link binaries statically, make sure that you add
+-Wl,--eh-frame-hdr to your linker options. This is required so that
+libunwind can find the information generated by the compiler required
+for stack unwinding.
+
+Using -static is rare, though, so unless you know this will affect you
+it probably won't.
+
+If you cannot or do not wish to install libunwind, you can still try
+to use two kinds of stack-unwinder: 1. glibc built-in stack-unwinder
+and 2. frame pointer based stack-unwinder.
+
+1. As we already mentioned, glibc's unwinder has a deadlock issue.
+However, if you don't use InstallFailureSignalHandler() or you don't
+worry about the rare possibilities of deadlocks, you can use this
+stack-unwinder. If you specify no options and libunwind isn't
+detected on your system, the configure script chooses this unwinder by
+default.
+
+2. The frame pointer based stack unwinder requires that your
+application, the glog library, and system libraries like libc, all be
+compiled with a frame pointer. This is *not* the default for x86-64.
+
+If you are on x86-64 system, know that you have a set of system
+libraries with frame-pointers enabled, and compile all your
+applications with -fno-omit-frame-pointer, then you can enable the
+frame pointer based stack unwinder by passing the
+--enable-frame-pointers flag to configure.
+
+
+Basic Installation
+==================
+
+Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system.
+
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+ 6. Often, you can also type `make uninstall' to remove the installed
+ files again.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about. Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you can use GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug. Until the bug is fixed you can use this workaround:
+
+ CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+ Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
Added: incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/Makefile.am?rev=1132266&view=auto
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/Makefile.am (added)
+++ incubator/mesos/trunk/third_party/libprocess/third_party/glog-0.3.1/Makefile.am Sun Jun 5 09:10:30 2011
@@ -0,0 +1,237 @@
+## Process this file with automake to produce Makefile.in
+
+# Make sure that when we re-make ./configure, we get the macros we need
+ACLOCAL_AMFLAGS = -I m4
+
+# This is so we can #include <glog/foo>
+AM_CPPFLAGS = -I$(top_srcdir)/src
+
+# This is mostly based on configure options
+AM_CXXFLAGS =
+
+# These are good warnings to turn on by default
+if GCC
+ AM_CXXFLAGS += -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare
+endif
+
+# These are x86-specific, having to do with frame-pointers
+if X86_64
+if ENABLE_FRAME_POINTERS
+ AM_CXXFLAGS += -fno-omit-frame-pointer
+else
+ # TODO(csilvers): check if -fomit-frame-pointer might be in $(CXXFLAGS),
+ # before setting this.
+ AM_CXXFLAGS += -DNO_FRAME_POINTER
+endif
+endif
+
+glogincludedir = $(includedir)/glog
+## The .h files you want to install (that is, .h files that people
+## who install this package can include in their own applications.)
+## We have to include both the .h and .h.in forms. The latter we
+## put in noinst_HEADERS.
+gloginclude_HEADERS = src/glog/log_severity.h
+nodist_gloginclude_HEADERS = src/glog/logging.h src/glog/raw_logging.h src/glog/vlog_is_on.h src/glog/stl_logging.h
+noinst_HEADERS = src/glog/logging.h.in src/glog/raw_logging.h.in src/glog/vlog_is_on.h.in src/glog/stl_logging.h.in
+
+docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
+## This is for HTML and other documentation you want to install.
+## Add your documentation files (in doc/) in addition to these
+## top-level boilerplate files. Also add a TODO file if you have one.
+dist_doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README README.windows \
+ doc/designstyle.css doc/glog.html
+
+## The libraries (.so's) you want to install
+lib_LTLIBRARIES =
+
+# The libraries libglog depends on.
+COMMON_LIBS = $(PTHREAD_LIBS) $(GFLAGS_LIBS) $(UNWIND_LIBS)
+# Compile switches for our unittest.
+TEST_CFLAGS = $(GTEST_CFLAGS) $(GMOCK_CFLAGS) $(GFLAGS_CFLAGS) $(AM_CXXFLAGS)
+# Libraries for our unittest.
+TEST_LIBS = $(GTEST_LIBS) $(GMOCK_LIBS) $(GFLAGS_LIBS)
+
+## unittests you want to run when people type 'make check'.
+## TESTS is for binary unittests, check_SCRIPTS for script-based unittests.
+## TESTS_ENVIRONMENT sets environment variables for when you run unittest,
+## but it only seems to take effect for *binary* unittests (argh!)
+TESTS =
+TESTS_ENVIRONMENT =
+check_SCRIPTS =
+# Every time you add a unittest to check_SCRIPTS, add it here too
+noinst_SCRIPTS =
+# Binaries used for script-based unittests.
+TEST_BINARIES =
+
+TESTS += logging_unittest
+logging_unittest_SOURCES = $(gloginclude_HEADERS) \
+ src/logging_unittest.cc \
+ src/config_for_unittests.h \
+ src/mock-log.h
+nodist_logging_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
+logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+logging_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
+logging_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
+
+check_SCRIPTS += logging_striplog_test_sh
+noinst_SCRIPTS += src/logging_striplog_test.sh
+logging_striplog_test_sh: logging_striptest0 logging_striptest2 logging_striptest10
+ $(top_srcdir)/src/logging_striplog_test.sh
+
+check_SCRIPTS += demangle_unittest_sh
+noinst_SCRIPTS += src/demangle_unittest.sh
+demangle_unittest_sh: demangle_unittest
+ $(builddir)/demangle_unittest # force to create lt-demangle_unittest
+ $(top_srcdir)/src/demangle_unittest.sh
+
+check_SCRIPTS += signalhandler_unittest_sh
+noinst_SCRIPTS += src/signalhandler_unittest.sh
+signalhandler_unittest_sh: signalhandler_unittest
+ $(builddir)/signalhandler_unittest # force to create lt-signalhandler_unittest
+ $(top_srcdir)/src/signalhandler_unittest.sh
+
+TEST_BINARIES += logging_striptest0
+logging_striptest0_SOURCES = $(gloginclude_HEADERS) \
+ src/logging_striptest_main.cc
+nodist_logging_striptest0_SOURCES = $(nodist_gloginclude_HEADERS)
+logging_striptest0_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+logging_striptest0_LDFLAGS = $(PTHREAD_CFLAGS)
+logging_striptest0_LDADD = libglog.la $(COMMON_LIBS)
+
+TEST_BINARIES += logging_striptest2
+logging_striptest2_SOURCES = $(gloginclude_HEADERS) \
+ src/logging_striptest2.cc
+nodist_logging_striptest2_SOURCES = $(nodist_gloginclude_HEADERS)
+logging_striptest2_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+logging_striptest2_LDFLAGS = $(PTHREAD_CFLAGS)
+logging_striptest2_LDADD = libglog.la $(COMMON_LIBS)
+
+TEST_BINARIES += logging_striptest10
+logging_striptest10_SOURCES = $(gloginclude_HEADERS) \
+ src/logging_striptest10.cc
+nodist_logging_striptest10_SOURCES = $(nodist_gloginclude_HEADERS)
+logging_striptest10_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+logging_striptest10_LDFLAGS = $(PTHREAD_CFLAGS)
+logging_striptest10_LDADD = libglog.la $(COMMON_LIBS)
+
+TESTS += demangle_unittest
+demangle_unittest_SOURCES = $(gloginclude_HEADERS) \
+ src/demangle_unittest.cc
+nodist_demangle_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
+demangle_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+demangle_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
+demangle_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
+
+TESTS += stacktrace_unittest
+stacktrace_unittest_SOURCES = $(gloginclude_HEADERS) \
+ src/stacktrace_unittest.cc
+nodist_stacktrace_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
+stacktrace_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+stacktrace_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
+stacktrace_unittest_LDADD = libglog.la $(COMMON_LIBS)
+
+TESTS += symbolize_unittest
+symbolize_unittest_SOURCES = $(gloginclude_HEADERS) \
+ src/symbolize_unittest.cc
+nodist_symbolize_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
+symbolize_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+symbolize_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
+symbolize_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
+
+TESTS += stl_logging_unittest
+stl_logging_unittest_SOURCES = $(gloginclude_HEADERS) \
+ src/stl_logging_unittest.cc
+nodist_stl_logging_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
+stl_logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+stl_logging_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
+stl_logging_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
+
+TEST_BINARIES += signalhandler_unittest
+signalhandler_unittest_SOURCES = $(gloginclude_HEADERS) \
+ src/signalhandler_unittest.cc
+nodist_signalhandler_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
+signalhandler_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+signalhandler_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
+signalhandler_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
+
+TESTS += utilities_unittest
+utilities_unittest_SOURCES = $(gloginclude_HEADERS) \
+ src/utilities_unittest.cc
+nodist_utilities_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
+utilities_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+utilities_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
+utilities_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
+
+if HAVE_GMOCK
+TESTS += mock_log_test
+mock_log_test_SOURCES = $(gloginclude_HEADERS) \
+ src/mock-log_test.cc
+nodist_mock_log_test_SOURCES = $(nodist_gloginclude_HEADERS)
+mock_log_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+mock_log_test_LDFLAGS = $(PTHREAD_CFLAGS)
+mock_log_test_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
+endif
+
+## vvvv RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS
+
+lib_LTLIBRARIES += libglog.la
+libglog_la_SOURCES = $(gloginclude_HEADERS) \
+ src/logging.cc src/raw_logging.cc src/vlog_is_on.cc \
+ src/utilities.cc src/utilities.h \
+ src/demangle.cc src/demangle.h \
+ src/stacktrace.h \
+ src/stacktrace_generic-inl.h \
+ src/stacktrace_libunwind-inl.h \
+ src/stacktrace_powerpc-inl.h \
+ src/stacktrace_x86-inl.h \
+ src/stacktrace_x86_64-inl.h \
+ src/symbolize.cc src/symbolize.h \
+ src/signalhandler.cc \
+ src/base/mutex.h src/base/googleinit.h \
+ src/base/commandlineflags.h src/googletest.h
+nodist_libglog_la_SOURCES = $(nodist_gloginclude_HEADERS)
+
+libglog_la_CXXFLAGS = $(PTRHEAD_CFLAGS) $(GFLAGS_CFLAGS) $(AM_CXXFLAGS) -DNDEBUG
+libglog_la_LDFLAGS = $(PTRHEAD_CFLAGS) $(GFLAGS_LDFLAGS)
+libglog_la_LIBADD = $(COMMON_LIBS)
+
+## The location of the windows project file for each binary we make
+WINDOWS_PROJECTS = google-glog.sln
+WINDOWS_PROJECTS += vsprojects/libglog/libglog.vcproj
+WINDOWS_PROJECTS += vsprojects/logging_unittest/logging_unittest.vcproj
+WINDOWS_PROJECTS += vsprojects/libglog_static/libglog_static.vcproj
+WINDOWS_PROJECTS += vsprojects/logging_unittest_static/logging_unittest_static.vcproj
+
+## ^^^^ END OF RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS
+
+
+## This should always include $(TESTS), but may also include other
+## binaries that you compile but don't want automatically installed.
+noinst_PROGRAMS = $(TESTS) $(TEST_BINARIES)
+
+rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec
+ @cd packages && ./rpm.sh ${PACKAGE} ${VERSION}
+
+deb: dist-gzip packages/deb.sh packages/deb/*
+ @cd packages && ./deb.sh ${PACKAGE} ${VERSION}
+
+# Windows wants write permission to .vcproj files and maybe even sln files.
+dist-hook:
+ test -e "$(distdir)/vsprojects" \
+ && chmod -R u+w $(distdir)/*.sln $(distdir)/vsprojects/
+
+libtool: $(LIBTOOL_DEPS)
+ $(SHELL) ./config.status --recheck
+
+EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh packages/deb \
+ $(SCRIPTS) src/logging_unittest.err src/demangle_unittest.txt \
+ src/windows/config.h src/windows/port.h src/windows/port.cc \
+ src/windows/preprocess.sh \
+ src/windows/glog/log_severity.h src/windows/glog/logging.h \
+ src/windows/glog/raw_logging.h src/windows/glog/stl_logging.h \
+ src/windows/glog/vlog_is_on.h \
+ $(WINDOWS_PROJECTS)
+
+# Add pkgconfig file
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libglog.pc