From 55f2215d59434f2a615b42098501e33035a1f13a Mon Sep 17 00:00:00 2001 From: unknown_lamer Date: Tue, 11 Nov 2008 08:47:34 +0000 Subject: [PATCH] [project @ 2008-11-11 08:47:34 by unknown_lamer] 2008-11-11 Clinton Ebadi * source/Parser.C: GCC 4.x compilation fixes * source/ShitList.C: GCC 4.x compilation fixes * source/String.C: GCC 4.x compilation fixes * source/UserCommands.C: GCC 4.x compilation fixes * source/Channel.C: GCC 4.x compilation fixes 2007-11-08 Clinton Ebadi * configure.ac (LDFLAGS): Append GUILE_LDFLAGS to fix non-standard location builds (CXXFLAGS): Append GUILE_CFLAGS to fix non-standard location builds * guile.m4: Import guile.m4 (included in source tree since it doesn't change often and this will allow building on machines lacking a guile installation) * acinclude.m4: Fix underquoted AC_CPP macros Include guile.m4 rather than copying here 2007-10-05 Clinton Ebadi * source/Main.C (real_main): scm_eval_string debug initialization instead of setting the flags directly as they are no longer public in Guile 1.9.x --- ChangeLog | 42 +- INSTALL | 189 +++-- NEWS | 5 + acinclude.m4 | 441 +++--------- aclocal.m4 | 1446 ++++++++++++++++----------------------- configure.ac | 4 + scripts/bobot-utils.scm | 24 +- source/Channel.C | 4 +- source/Main.C | 7 +- source/Makefile.am | 3 +- source/Parser.C | 3 +- source/ShitList.C | 1 + source/String.C | 3 +- source/UserCommands.C | 6 +- 14 files changed, 908 insertions(+), 1270 deletions(-) rewrite acinclude.m4 (79%) diff --git a/ChangeLog b/ChangeLog index 83f3b15..689ef72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,45 @@ -2006-06-28 Clinton Ebadi +2008-11-11 Clinton Ebadi - * scripts/uname: redelim -> rdelim + * source/Parser.C: GCC 4.x compilation fixes + + * source/ShitList.C: GCC 4.x compilation fixes + + * source/String.C: GCC 4.x compilation fixes + + * source/UserCommands.C: GCC 4.x compilation fixes + + * source/Channel.C: GCC 4.x compilation fixes + +2007-11-08 Clinton Ebadi + + * configure.ac (LDFLAGS): Append GUILE_LDFLAGS to fix non-standard + location builds + (CXXFLAGS): Append GUILE_CFLAGS to fix non-standard location + builds + + * guile.m4: Import guile.m4 (included in source tree since it + doesn't change often and this will allow building on machines + lacking a guile installation) + + * acinclude.m4: Fix underquoted AC_CPP macros + Include guile.m4 rather than copying here + +2007-10-05 Clinton Ebadi + + * source/Main.C (real_main): scm_eval_string debug initialization + instead of setting the flags directly as they are no longer public + in Guile 1.9.x + +2006-06-28 Clinton Ebadi * Release: 2.2.2 + * scripts/bobot-utils.scm (bot:load): Fixed loop logic so that + directories other than the first entry in the load path are + actually searched + + * scripts/uname: redelim -> rdelim + * AUTHORS: Added Stelz to the Help by section * source/Bot.C (readConfig): If a logfile starting in / is found @@ -1168,6 +1204,6 @@ * source/Queue.C: Didn't notice iostream.h here! Fixed -Copyright 2002,2003,2004,2005 Clinton Ebadi +Copyright 2002,2003,2004,2005,2006,2007 Clinton Ebadi Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. diff --git a/INSTALL b/INSTALL index b42a17a..d3c5b40 100644 --- a/INSTALL +++ b/INSTALL @@ -1,38 +1,54 @@ +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. + Basic Installation ================== - These are generic installation instructions. +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, a file -`config.cache' that saves the results of its tests to speed up -reconfiguring, and a file `config.log' containing compiler output -(useful mainly for debugging `configure'). +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 at some point `config.cache' -contains results you don't want to keep, you may remove or edit it. +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.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change -it or regenerate `configure' using a newer version of `autoconf'. + 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. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. + `./configure' to configure the package for your system. - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. + 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. @@ -51,52 +67,55 @@ The simplest way to compile this package is: 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. You can give `configure' -initial values for variables by setting them in the environment. Using -a Bourne-compatible shell, you can do that on the command line like -this: - CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure +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 -Or on systems that have the `env' program, you can do it like this: - env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== - You can compile the package for more than one kind of computer at the +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 must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the +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 `..'. - If you have to use a `make' that does not supports the `VPATH' -variable, you have 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. + 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' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. +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 -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. +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=PATH' to specify different values for particular +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. @@ -107,7 +126,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= - Some packages pay attention to `--enable-FEATURE' options to +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 @@ -122,48 +141,86 @@ you can use the `configure' options `--x-includes=DIR' and Specifying the System Type ========================== - There may be some features `configure' can not figure out -automatically, but needs to determine by the type of host the package -will run on. Usually `configure' can figure that out, but if it prints -a message saying it can not guess the host type, give it the -`--host=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name with three fields: +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 -See the file `config.sub' for the possible values of each field. If +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 host type. +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 are building compiler tools for cross-compiling, you can also -use the `--target=TYPE' option to select the type of system they will -produce code for and the `--build=TYPE' option to select the type of -system on which you are compiling the package. + 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'. +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. -Operation Controls +Defining Variables ================== - `configure' recognizes the following options to control how it -operates. +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: -`--cache-file=FILE' - Use and save the results of the tests in FILE instead of - `./config.cache'. Set FILE to `/dev/null' to disable caching, for - debugging `configure'. + ./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' @@ -175,8 +232,6 @@ operates. Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. -`--version' - Print the version of Autoconf used to generate the `configure' - script, and exit. +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. -`configure' also accepts some other, not widely useful, options. diff --git a/NEWS b/NEWS index 19a40f9..654c220 100644 --- a/NEWS +++ b/NEWS @@ -23,9 +23,14 @@ IMPORTANT NOTES: ====== The News ===================================================== ===================================================================== +Version 2.2.3: +- Building with Guile in a non-standard location now works + Version 2.2.2 (2006-06-28): - No longer segfaults when loading bobot-utils.scm - bot:match-to-me produces a valid regexp again +- scripts/uname now properly uses (ice-9 rdelim) instead of redelim +- bot:load now loads files properly Version 2.2.1 (2006-06-28): - If the log directory does not exist the bot creates it diff --git a/acinclude.m4 b/acinclude.m4 dissimilarity index 79% index d838b9d..6a2aef6 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,330 +1,111 @@ -# -# Copyright (c) 1998 Etienne Bernard -# Copyright (c) 2002 Clinton Ebadi -# - -# Check if we have a decent C++ compiler -# that supports Standard Template Library (STL) -AC_DEFUN(AC_CPP_STL, -[ - AC_MSG_CHECKING([for STL support]) - - AC_CACHE_VAL(ac_cv_cpp_stl, - [ - AC_LANG_CPLUSPLUS - cat > conftest.$ac_ext < - int main() { - std::list l; - return 0; - }; -EOF - - - if AC_TRY_EVAL(ac_link) && test -s conftest; then - ac_cv_cpp_stl="have_stl=yes" - else - ac_cv_cpp_stl="have_stl=no" - fi - rm -f conftest* - ])dnl - eval "$ac_cv_cpp_stl" - - AC_MSG_RESULT([$have_stl]) - - if test "$have_stl" != "yes"; then - AC_MSG_ERROR([Sorry, you need STL support with your compiler]) - fi -]) - - -# Check is compiler has ios_base -AC_DEFUN(AC_CPP_STL_IOSBASE, -[ - AC_MSG_CHECKING([for std::ios_base in iostreams]) - - AC_CACHE_VAL(ac_cv_cpp_iosbase, - [ - AC_LANG_CPLUSPLUS - cat > conftest.$ac_ext < - #include - int main() { - std::ifstream file ("README", std::ios_base::in); - return 0; - }; -EOF - - if AC_TRY_EVAL(ac_link) && test -s conftest; then - ac_cv_cpp_iosbase="have_iosbase=yes" - else - ac_cv_cpp_iosbase="have_iosbase=no" - fi - rm -f conftest* - ])dnl - eval "$ac_cv_cpp_iosbase" - - AC_MSG_RESULT([$have_iosbase]) - - if test "$have_iosbase" = "yes"; then - HAVE_IOSBASE="-DHAVE_IOSBASE" - AC_DEFINE(HAVE_IOSBASE,1, [std::ios_base]) - else - AC_DEFINE(HAVE_IOSBASE,0) - fi -]) - -# Check if STL elements support the clear() method -AC_DEFUN(AC_CPP_STL_CLEAR, -[ - AC_MSG_CHECKING([for clear() method in STL objects]) - - AC_CACHE_VAL(ac_cv_cpp_stl_clear, - [ - AC_LANG_CPLUSPLUS - cat > conftest.$ac_ext < - int main() { - std::map > m; - m.clear(); - return 0; - }; -EOF - - if AC_TRY_EVAL(ac_link) && test -s conftest; then - ac_cv_cpp_stl_clear="have_stl_clear=yes" - else - ac_cv_cpp_stl_clear="have_stl_clear=no" - fi - rm -f conftest* - ])dnl - eval "$ac_cv_cpp_stl_clear" - - AC_MSG_RESULT([$have_stl_clear]) - - if test "$have_stl_clear" = "yes"; then - HAVE_STL_CLEAR="-DHAVE_STL_CLEAR" - AC_DEFINE(HAVE_STL_CLEAR,1, [STL Objects have a clear method]) - fi -]) -## Autoconf macros for working with Guile. -## -## Copyright (C) 1998,2001 Free Software Foundation, Inc. -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2, or (at your option) -## any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this software; see the file COPYING. If not, write to -## the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -## Boston, MA 02110-1301 USA -## -## As a special exception, the Free Software Foundation gives permission -## for additional uses of the text contained in its release of GUILE. -## -## The exception is that, if you link the GUILE library with other files -## to produce an executable, this does not by itself cause the -## resulting executable to be covered by the GNU General Public License. -## Your use of that executable is in no way restricted on account of -## linking the GUILE library code into it. -## -## This exception does not however invalidate any other reasons why -## the executable file might be covered by the GNU General Public License. -## -## This exception applies only to the code released by the -## Free Software Foundation under the name GUILE. If you copy -## code from other Free Software Foundation releases into a copy of -## GUILE, as the General Public License permits, the exception does -## not apply to the code that you add in this way. To avoid misleading -## anyone as to the status of such modified files, you must delete -## this exception notice from them. -## -## If you write modifications of your own for GUILE, it is your choice -## whether to permit this exception to apply to your modifications. -## If you do not wish that, delete this exception notice. - -## Index -## ----- -## -## GUILE_PROGS -- set paths to Guile interpreter, config and tool programs -## GUILE_FLAGS -- set flags for compiling and linking with Guile -## GUILE_SITE_DIR -- find path to Guile "site" directory -## GUILE_CHECK -- evaluate Guile Scheme code and capture the return value -## GUILE_MODULE_CHECK -- check feature of a Guile Scheme module -## GUILE_MODULE_AVAILABLE -- check availability of a Guile Scheme module -## GUILE_MODULE_REQUIRED -- fail if a Guile Scheme module is unavailable -## GUILE_MODULE_EXPORTS -- check if a module exports a variable -## GUILE_MODULE_REQUIRED_EXPORT -- fail if a module doesn't export a variable - -## Code -## ---- - -## NOTE: Comments preceding an AC_DEFUN (starting from "Usage:") are massaged -## into doc/ref/autoconf-macros.texi (see Makefile.am in that directory). - -# GUILE_PROGS -- set paths to Guile interpreter, config and tool programs -# -# Usage: GUILE_PROGS -# -# This macro looks for programs @code{guile}, @code{guile-config} and -# @code{guile-tools}, and sets variables @var{GUILE}, @var{GUILE_CONFIG} and -# @var{GUILE_TOOLS}, to their paths, respectively. If either of the first two -# is not found, signal error. -# -# The variables are marked for substitution, as by @code{AC_SUBST}. -# -AC_DEFUN([GUILE_PROGS], - [AC_PATH_PROG(GUILE,guile) - if test "$GUILE" = "" ; then - AC_MSG_ERROR([guile required but not found]) - fi - AC_SUBST(GUILE) - AC_PATH_PROG(GUILE_CONFIG,guile-config) - if test "$GUILE_CONFIG" = "" ; then - AC_MSG_ERROR([guile-config required but not found]) - fi - AC_SUBST(GUILE_CONFIG) - AC_PATH_PROG(GUILE_TOOLS,guile-tools) - AC_SUBST(GUILE_TOOLS) - ]) - -# GUILE_FLAGS -- set flags for compiling and linking with Guile -# -# Usage: GUILE_FLAGS -# -# This macro runs the @code{guile-config} script, installed with Guile, to -# find out where Guile's header files and libraries are installed. It sets -# two variables, @var{GUILE_CFLAGS} and @var{GUILE_LDFLAGS}. -# -# @var{GUILE_CFLAGS}: flags to pass to a C or C++ compiler to build code that -# uses Guile header files. This is almost always just a @code{-I} flag. -# -# @var{GUILE_LDFLAGS}: flags to pass to the linker to link a program against -# Guile. This includes @code{-lguile} for the Guile library itself, any -# libraries that Guile itself requires (like -lqthreads), and so on. It may -# also include a @code{-L} flag to tell the compiler where to find the -# libraries. -# -# The variables are marked for substitution, as by @code{AC_SUBST}. -# -AC_DEFUN([GUILE_FLAGS], - [AC_REQUIRE([GUILE_PROGS])dnl - AC_MSG_CHECKING([libguile compile flags]) - GUILE_CFLAGS="`$GUILE_CONFIG compile`" - AC_MSG_RESULT([$GUILE_CFLAGS]) - AC_MSG_CHECKING([libguile link flags]) - GUILE_LDFLAGS="`$GUILE_CONFIG link`" - AC_MSG_RESULT([$GUILE_LDFLAGS]) - AC_SUBST(GUILE_CFLAGS) - AC_SUBST(GUILE_LDFLAGS) - ]) - -# GUILE_SITE_DIR -- find path to Guile "site" directory -# -# Usage: GUILE_SITE_DIR -# -# This looks for Guile's "site" directory, usually something like -# PREFIX/share/guile/site, and sets var @var{GUILE_SITE} to the path. -# Note that the var name is different from the macro name. -# -# The variable is marked for substitution, as by @code{AC_SUBST}. -# -AC_DEFUN([GUILE_SITE_DIR], - [AC_REQUIRE([GUILE_PROGS])dnl - AC_MSG_CHECKING(for Guile site directory) - GUILE_SITE=`[$GUILE_CONFIG] info pkgdatadir`/site - AC_MSG_RESULT($GUILE_SITE) - AC_SUBST(GUILE_SITE) - ]) - -# GUILE_CHECK -- evaluate Guile Scheme code and capture the return value -# -# Usage: GUILE_CHECK_RETVAL(var,check) -# -# @var{var} is a shell variable name to be set to the return value. -# @var{check} is a Guile Scheme expression, evaluated with "$GUILE -c", and -# returning either 0 or non-#f to indicate the check passed. -# Non-0 number or #f indicates failure. -# Avoid using the character "#" since that confuses autoconf. -# -AC_DEFUN([GUILE_CHECK], - [AC_REQUIRE([GUILE_PROGS]) - $GUILE -c "$2" > /dev/null 2>&1 - $1=$? - ]) - -# GUILE_MODULE_CHECK -- check feature of a Guile Scheme module -# -# Usage: GUILE_MODULE_CHECK(var,module,featuretest,description) -# -# @var{var} is a shell variable name to be set to "yes" or "no". -# @var{module} is a list of symbols, like: (ice-9 common-list). -# @var{featuretest} is an expression acceptable to GUILE_CHECK, q.v. -# @var{description} is a present-tense verb phrase (passed to AC_MSG_CHECKING). -# -AC_DEFUN([GUILE_MODULE_CHECK], - [AC_MSG_CHECKING([if $2 $4]) - GUILE_CHECK($1,(use-modules $2) (exit ((lambda () $3)))) - if test "$$1" = "0" ; then $1=yes ; else $1=no ; fi - AC_MSG_RESULT($$1) - ]) - -# GUILE_MODULE_AVAILABLE -- check availability of a Guile Scheme module -# -# Usage: GUILE_MODULE_AVAILABLE(var,module) -# -# @var{var} is a shell variable name to be set to "yes" or "no". -# @var{module} is a list of symbols, like: (ice-9 common-list). -# -AC_DEFUN([GUILE_MODULE_AVAILABLE], - [GUILE_MODULE_CHECK($1,$2,0,is available) - ]) - -# GUILE_MODULE_REQUIRED -- fail if a Guile Scheme module is unavailable -# -# Usage: GUILE_MODULE_REQUIRED(symlist) -# -# @var{symlist} is a list of symbols, WITHOUT surrounding parens, -# like: ice-9 common-list. -# -AC_DEFUN([GUILE_MODULE_REQUIRED], - [GUILE_MODULE_AVAILABLE(ac_guile_module_required, ($1)) - if test "$ac_guile_module_required" = "no" ; then - AC_MSG_ERROR([required guile module not found: ($1)]) - fi - ]) - -# GUILE_MODULE_EXPORTS -- check if a module exports a variable -# -# Usage: GUILE_MODULE_EXPORTS(var,module,modvar) -# -# @var{var} is a shell variable to be set to "yes" or "no". -# @var{module} is a list of symbols, like: (ice-9 common-list). -# @var{modvar} is the Guile Scheme variable to check. -# -AC_DEFUN([GUILE_MODULE_EXPORTS], - [GUILE_MODULE_CHECK($1,$2,$3,exports `$3') - ]) - -# GUILE_MODULE_REQUIRED_EXPORT -- fail if a module doesn't export a variable -# -# Usage: GUILE_MODULE_REQUIRED_EXPORT(module,modvar) -# -# @var{module} is a list of symbols, like: (ice-9 common-list). -# @var{modvar} is the Guile Scheme variable to check. -# -AC_DEFUN([GUILE_MODULE_REQUIRED_EXPORT], - [GUILE_MODULE_EXPORTS(guile_module_required_export,$1,$2) - if test "$guile_module_required_export" = "no" ; then - AC_MSG_ERROR([module $1 does not export $2; required]) - fi - ]) - -## guile.m4 ends here +# +# Copyright (c) 1998 Etienne Bernard +# Copyright (c) 2002 Clinton Ebadi +# + +# Check if we have a decent C++ compiler +# that supports Standard Template Library (STL) +AC_DEFUN([AC_CPP_STL], +[ + AC_MSG_CHECKING([for STL support]) + + AC_CACHE_VAL(ac_cv_cpp_stl, + [ + AC_LANG_CPLUSPLUS + cat > conftest.$ac_ext < + int main() { + std::list l; + return 0; + }; +EOF + + + if AC_TRY_EVAL(ac_link) && test -s conftest; then + ac_cv_cpp_stl="have_stl=yes" + else + ac_cv_cpp_stl="have_stl=no" + fi + rm -f conftest* + ])dnl + eval "$ac_cv_cpp_stl" + + AC_MSG_RESULT([$have_stl]) + + if test "$have_stl" != "yes"; then + AC_MSG_ERROR([Sorry, you need STL support with your compiler]) + fi +]) + + +# Check is compiler has ios_base +AC_DEFUN([AC_CPP_STL_IOSBASE], +[ + AC_MSG_CHECKING([for std::ios_base in iostreams]) + + AC_CACHE_VAL(ac_cv_cpp_iosbase, + [ + AC_LANG_CPLUSPLUS + cat > conftest.$ac_ext < + #include + int main() { + std::ifstream file ("README", std::ios_base::in); + return 0; + }; +EOF + + if AC_TRY_EVAL(ac_link) && test -s conftest; then + ac_cv_cpp_iosbase="have_iosbase=yes" + else + ac_cv_cpp_iosbase="have_iosbase=no" + fi + rm -f conftest* + ])dnl + eval "$ac_cv_cpp_iosbase" + + AC_MSG_RESULT([$have_iosbase]) + + if test "$have_iosbase" = "yes"; then + HAVE_IOSBASE="-DHAVE_IOSBASE" + AC_DEFINE(HAVE_IOSBASE,1, [std::ios_base]) + else + AC_DEFINE(HAVE_IOSBASE,0) + fi +]) + +# Check if STL elements support the clear() method +AC_DEFUN([AC_CPP_STL_CLEAR], +[ + AC_MSG_CHECKING([for clear() method in STL objects]) + + AC_CACHE_VAL(ac_cv_cpp_stl_clear, + [ + AC_LANG_CPLUSPLUS + cat > conftest.$ac_ext < + int main() { + std::map > m; + m.clear(); + return 0; + }; +EOF + + if AC_TRY_EVAL(ac_link) && test -s conftest; then + ac_cv_cpp_stl_clear="have_stl_clear=yes" + else + ac_cv_cpp_stl_clear="have_stl_clear=no" + fi + rm -f conftest* + ])dnl + eval "$ac_cv_cpp_stl_clear" + + AC_MSG_RESULT([$have_stl_clear]) + + if test "$have_stl_clear" = "yes"; then + HAVE_STL_CLEAR="-DHAVE_STL_CLEAR" + AC_DEFINE(HAVE_STL_CLEAR,1, [STL Objects have a clear method]) + fi +]) + +m4_include([guile.m4]) \ No newline at end of file diff --git a/aclocal.m4 b/aclocal.m4 index 38e4c31..986ff00 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.7.9 -*- Autoconf -*- +# generated automatically by aclocal 1.10.1 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,604 +11,57 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# -# Copyright (c) 1998 Etienne Bernard -# Copyright (c) 2002 Clinton Ebadi -# - -# Check if we have a decent C++ compiler -# that supports Standard Template Library (STL) -AC_DEFUN(AC_CPP_STL, -[ - AC_MSG_CHECKING([for STL support]) - - AC_CACHE_VAL(ac_cv_cpp_stl, - [ - AC_LANG_CPLUSPLUS - cat > conftest.$ac_ext < - int main() { - std::list l; - return 0; - }; -EOF - - - if AC_TRY_EVAL(ac_link) && test -s conftest; then - ac_cv_cpp_stl="have_stl=yes" - else - ac_cv_cpp_stl="have_stl=no" - fi - rm -f conftest* - ])dnl - eval "$ac_cv_cpp_stl" - - AC_MSG_RESULT([$have_stl]) - - if test "$have_stl" != "yes"; then - AC_MSG_ERROR([Sorry, you need STL support with your compiler]) - fi -]) - - -# Check is compiler has ios_base -AC_DEFUN(AC_CPP_STL_IOSBASE, -[ - AC_MSG_CHECKING([for std::ios_base in iostreams]) - - AC_CACHE_VAL(ac_cv_cpp_iosbase, - [ - AC_LANG_CPLUSPLUS - cat > conftest.$ac_ext < - #include - int main() { - std::ifstream file ("README", std::ios_base::in); - return 0; - }; -EOF - - if AC_TRY_EVAL(ac_link) && test -s conftest; then - ac_cv_cpp_iosbase="have_iosbase=yes" - else - ac_cv_cpp_iosbase="have_iosbase=no" - fi - rm -f conftest* - ])dnl - eval "$ac_cv_cpp_iosbase" - - AC_MSG_RESULT([$have_iosbase]) - - if test "$have_iosbase" = "yes"; then - HAVE_IOSBASE="-DHAVE_IOSBASE" - AC_DEFINE(HAVE_IOSBASE,1, [std::ios_base]) - else - AC_DEFINE(HAVE_IOSBASE,0) - fi -]) - -# Check if STL elements support the clear() method -AC_DEFUN(AC_CPP_STL_CLEAR, -[ - AC_MSG_CHECKING([for clear() method in STL objects]) - - AC_CACHE_VAL(ac_cv_cpp_stl_clear, - [ - AC_LANG_CPLUSPLUS - cat > conftest.$ac_ext < - int main() { - std::map > m; - m.clear(); - return 0; - }; -EOF - - if AC_TRY_EVAL(ac_link) && test -s conftest; then - ac_cv_cpp_stl_clear="have_stl_clear=yes" - else - ac_cv_cpp_stl_clear="have_stl_clear=no" - fi - rm -f conftest* - ])dnl - eval "$ac_cv_cpp_stl_clear" - - AC_MSG_RESULT([$have_stl_clear]) - - if test "$have_stl_clear" = "yes"; then - HAVE_STL_CLEAR="-DHAVE_STL_CLEAR" - AC_DEFINE(HAVE_STL_CLEAR,1, [STL Objects have a clear method]) - fi -]) - - - - -# GUILE_PROGS -- set paths to Guile interpreter, config and tool programs -# -# Usage: GUILE_PROGS -# -# This macro looks for programs @code{guile}, @code{guile-config} and -# @code{guile-tools}, and sets variables @var{GUILE}, @var{GUILE_CONFIG} and -# @var{GUILE_TOOLS}, to their paths, respectively. If either of the first two -# is not found, signal error. -# -# The variables are marked for substitution, as by @code{AC_SUBST}. -# -AC_DEFUN([GUILE_PROGS], - [AC_PATH_PROG(GUILE,guile) - if test "$GUILE" = "" ; then - AC_MSG_ERROR([guile required but not found]) - fi - AC_SUBST(GUILE) - AC_PATH_PROG(GUILE_CONFIG,guile-config) - if test "$GUILE_CONFIG" = "" ; then - AC_MSG_ERROR([guile-config required but not found]) - fi - AC_SUBST(GUILE_CONFIG) - AC_PATH_PROG(GUILE_TOOLS,guile-tools) - AC_SUBST(GUILE_TOOLS) - ]) - -# GUILE_FLAGS -- set flags for compiling and linking with Guile -# -# Usage: GUILE_FLAGS -# -# This macro runs the @code{guile-config} script, installed with Guile, to -# find out where Guile's header files and libraries are installed. It sets -# two variables, @var{GUILE_CFLAGS} and @var{GUILE_LDFLAGS}. -# -# @var{GUILE_CFLAGS}: flags to pass to a C or C++ compiler to build code that -# uses Guile header files. This is almost always just a @code{-I} flag. -# -# @var{GUILE_LDFLAGS}: flags to pass to the linker to link a program against -# Guile. This includes @code{-lguile} for the Guile library itself, any -# libraries that Guile itself requires (like -lqthreads), and so on. It may -# also include a @code{-L} flag to tell the compiler where to find the -# libraries. -# -# The variables are marked for substitution, as by @code{AC_SUBST}. -# -AC_DEFUN([GUILE_FLAGS], - [AC_REQUIRE([GUILE_PROGS])dnl - AC_MSG_CHECKING([libguile compile flags]) - GUILE_CFLAGS="`$GUILE_CONFIG compile`" - AC_MSG_RESULT([$GUILE_CFLAGS]) - AC_MSG_CHECKING([libguile link flags]) - GUILE_LDFLAGS="`$GUILE_CONFIG link`" - AC_MSG_RESULT([$GUILE_LDFLAGS]) - AC_SUBST(GUILE_CFLAGS) - AC_SUBST(GUILE_LDFLAGS) - ]) - -# GUILE_SITE_DIR -- find path to Guile "site" directory -# -# Usage: GUILE_SITE_DIR -# -# This looks for Guile's "site" directory, usually something like -# PREFIX/share/guile/site, and sets var @var{GUILE_SITE} to the path. -# Note that the var name is different from the macro name. -# -# The variable is marked for substitution, as by @code{AC_SUBST}. -# -AC_DEFUN([GUILE_SITE_DIR], - [AC_REQUIRE([GUILE_PROGS])dnl - AC_MSG_CHECKING(for Guile site directory) - GUILE_SITE=`[$GUILE_CONFIG] info pkgdatadir`/site - AC_MSG_RESULT($GUILE_SITE) - AC_SUBST(GUILE_SITE) - ]) - -# GUILE_CHECK -- evaluate Guile Scheme code and capture the return value -# -# Usage: GUILE_CHECK_RETVAL(var,check) -# -# @var{var} is a shell variable name to be set to the return value. -# @var{check} is a Guile Scheme expression, evaluated with "$GUILE -c", and -# returning either 0 or non-#f to indicate the check passed. -# Non-0 number or #f indicates failure. -# Avoid using the character "#" since that confuses autoconf. -# -AC_DEFUN([GUILE_CHECK], - [AC_REQUIRE([GUILE_PROGS]) - $GUILE -c "$2" > /dev/null 2>&1 - $1=$? - ]) - -# GUILE_MODULE_CHECK -- check feature of a Guile Scheme module -# -# Usage: GUILE_MODULE_CHECK(var,module,featuretest,description) -# -# @var{var} is a shell variable name to be set to "yes" or "no". -# @var{module} is a list of symbols, like: (ice-9 common-list). -# @var{featuretest} is an expression acceptable to GUILE_CHECK, q.v. -# @var{description} is a present-tense verb phrase (passed to AC_MSG_CHECKING). -# -AC_DEFUN([GUILE_MODULE_CHECK], - [AC_MSG_CHECKING([if $2 $4]) - GUILE_CHECK($1,(use-modules $2) (exit ((lambda () $3)))) - if test "$$1" = "0" ; then $1=yes ; else $1=no ; fi - AC_MSG_RESULT($$1) - ]) - -# GUILE_MODULE_AVAILABLE -- check availability of a Guile Scheme module -# -# Usage: GUILE_MODULE_AVAILABLE(var,module) -# -# @var{var} is a shell variable name to be set to "yes" or "no". -# @var{module} is a list of symbols, like: (ice-9 common-list). -# -AC_DEFUN([GUILE_MODULE_AVAILABLE], - [GUILE_MODULE_CHECK($1,$2,0,is available) - ]) - -# GUILE_MODULE_REQUIRED -- fail if a Guile Scheme module is unavailable -# -# Usage: GUILE_MODULE_REQUIRED(symlist) -# -# @var{symlist} is a list of symbols, WITHOUT surrounding parens, -# like: ice-9 common-list. -# -AC_DEFUN([GUILE_MODULE_REQUIRED], - [GUILE_MODULE_AVAILABLE(ac_guile_module_required, ($1)) - if test "$ac_guile_module_required" = "no" ; then - AC_MSG_ERROR([required guile module not found: ($1)]) - fi - ]) - -# GUILE_MODULE_EXPORTS -- check if a module exports a variable -# -# Usage: GUILE_MODULE_EXPORTS(var,module,modvar) -# -# @var{var} is a shell variable to be set to "yes" or "no". -# @var{module} is a list of symbols, like: (ice-9 common-list). -# @var{modvar} is the Guile Scheme variable to check. -# -AC_DEFUN([GUILE_MODULE_EXPORTS], - [GUILE_MODULE_CHECK($1,$2,$3,exports `$3') - ]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(AC_AUTOCONF_VERSION, [2.61],, +[m4_warning([this file was generated for autoconf 2.61. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) -# GUILE_MODULE_REQUIRED_EXPORT -- fail if a module doesn't export a variable -# -# Usage: GUILE_MODULE_REQUIRED_EXPORT(module,modvar) +# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. # -# @var{module} is a list of symbols, like: (ice-9 common-list). -# @var{modvar} is the Guile Scheme variable to check. -# -AC_DEFUN([GUILE_MODULE_REQUIRED_EXPORT], - [GUILE_MODULE_EXPORTS(guile_module_required_export,$1,$2) - if test "$guile_module_required_export" = "no" ; then - AC_MSG_ERROR([module $1 does not export $2; required]) - fi - ]) - - -# Do all the work for Automake. -*- Autoconf -*- - -# This macro actually does too much some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02110-1301, USA. - -# serial 10 - -AC_PREREQ([2.54]) - -# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow -# the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl - AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_MISSING_PROG(AMTAR, tar) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl - -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -]) -]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $1 | $1:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) - -# Copyright 2002 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.7.9])]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright 2001, 2002 Free Software Foundation, Inc. +[AM_AUTOMAKE_VERSION([1.10.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02110-1301, USA. - -# serial 2 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +# AM_AUX_DIR_EXPAND -*- Autoconf -*- +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # -# Check to make sure that the build environment is sane. -# - -# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02110-1301, USA. - -# serial 3 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# -*- Autoconf -*- - - -# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02110-1301, USA. - -# serial 3 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# AM_AUX_DIR_EXPAND - -# Copyright 2001 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02110-1301, USA. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to @@ -648,131 +101,56 @@ fi # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. -# Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50]) - -AC_DEFUN([AM_AUX_DIR_EXPAND], [ +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. - -# Copyright 2001 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02110-1301, USA. - -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) - -# AM_PROG_INSTALL_STRIP - -# Copyright 2001 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02110-1301, USA. - -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# -*- Autoconf -*- -# Copyright (C) 2003 Free Software Foundation, Inc. +# AM_CONDITIONAL -*- Autoconf -*- -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02110-1301, USA. +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 1 +# serial 8 -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' else - am__leading_dot=_ + $1_TRUE='#' + $1_FALSE= fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# serial 5 -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02110-1301, USA. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# serial 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -781,7 +159,6 @@ AC_SUBST([am__leading_dot])]) # CC etc. in the Makefile, will ask for an AC_PROG_CC use... - # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. @@ -801,6 +178,7 @@ AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) @@ -840,7 +218,9 @@ AC_CACHE_CHECK([dependency style of $depcc], : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - : > sub/conftst$i.h + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf @@ -864,13 +244,19 @@ AC_CACHE_CHECK([dependency style of $depcc], depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings - # (even with -Werror). So we grep stderr for any message - # that says an option was ignored. - if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi @@ -904,120 +290,268 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking Speeds up one-time builds - --enable-dependency-tracking Do not reject slow dependency extractors]) +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) -# Generate code to set up dependency tracking. -*- Autoconf -*- +# Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. +#serial 3 -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02110-1301, USA. +# serial 13 -#serial 2 +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.60])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue - # Extract the definition of DEP_FILES from the Makefile without - # running `make'. - DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` - test -z "$DEPDIR" && continue - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n -e '/^U = / s///p' < "$mf"` - test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" - # We invoke sed twice because it is the simplest approach to - # changing $(DEPDIR) to its actual value in the expansion. - for file in `sed -n -e ' - /^DEP_FILES = .*\\\\$/ { - s/^DEP_FILES = // - :loop - s/\\\\$// - p - n - /\\\\$/ b loop - p - } - /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac done -])# _AM_OUTPUT_DEPENDENCY_COMMANDS +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) -# Check to see how 'make' treats includes. -*- Autoconf -*- +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +# serial 2 -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Check to see how 'make' treats includes. -*- Autoconf -*- -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02110-1301, USA. +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 3 # AM_MAKE_INCLUDE() # ----------------- @@ -1061,73 +595,287 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# AM_CONDITIONAL -*- Autoconf -*- +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright 1997, 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. +# serial 5 -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02110-1301, USA. -# serial 5 +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) -AC_PREREQ(2.52) +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) -if $2; then - $1_TRUE= - $1_FALSE='#' +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : else - $1_TRUE='#' - $1_FALSE= + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]) -fi])]) +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) -# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. +# Check how to create a tarball. -*- Autoconf -*- -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# serial 2 -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02110-1301, USA. +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac -AC_PREREQ([2.52]) + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break -# serial 6 + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR +m4_include([acinclude.m4]) diff --git a/configure.ac b/configure.ac index 701b02e..8517797 100644 --- a/configure.ac +++ b/configure.ac @@ -20,6 +20,7 @@ AC_ARG_ENABLE(scripting, [ if test $enableval = "no"; then AC_SUBST(GUILE_LDFLAGS,"") + AC_SUBST(GUILE_CFLAGS,"") else GUILE_PROGS GUILE_FLAGS @@ -35,6 +36,9 @@ AC_ARG_ENABLE(scripting, AC_DEFINE(MULTITHREAD,1) ]) +AC_SUBST(CXXFLAGS, "$GUILE_CFLAGS $CXXFLAGS") +AC_SUBST(LDFLAGS, "$GUILE_LDFLAGS $LDFLAGS") + dnl Removed this from the source tree dnl AC_ARG_ENABLE(telnetserver, dnl [ --enable-telnetserver Use the Telnet server], diff --git a/scripts/bobot-utils.scm b/scripts/bobot-utils.scm index ec1e93f..baa69bf 100644 --- a/scripts/bobot-utils.scm +++ b/scripts/bobot-utils.scm @@ -35,17 +35,19 @@ (cond ((not (null? load-path)) (if (not (let ext-loop ((extensions %bot:load-extensions)) - (if (not (null? extensions)) - (if (catch 'system-error - (lambda () - (load - (string-append (car load-path) - file - (car extensions)))) - (lambda args - #f )) - #t - (ext-loop (cdr extensions)))))) + (cond ((not (null? extensions)) + (if (catch 'system-error + (lambda () + (load + (string-append (car load-path) + file + (car extensions))) + #t) + (lambda args + #f )) + #t + (ext-loop (cdr extensions)))) + (else #f)))) (path-loop (cdr load-path)))) (else (begin (bot:log "ERROR: File " file " Not Found!\n") #f))))) diff --git a/source/Channel.C b/source/Channel.C index 1ab7b95..ab45ba5 100644 --- a/source/Channel.C +++ b/source/Channel.C @@ -1,6 +1,6 @@ // Channel.C -*- C++ -*- // Copyright (c) 1997, 1998 Etienne BERNARD -// Copyright (C) 2002,2005 Clinton Ebadi +// Copyright (C) 2002,2005,2008 Clinton Ebadi // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -21,6 +21,8 @@ #include "config.h" #endif +#include + #include "Macros.H" #include "Utils.H" #include "Channel.H" diff --git a/source/Main.C b/source/Main.C index 228b330..eb46acb 100644 --- a/source/Main.C +++ b/source/Main.C @@ -254,10 +254,9 @@ namespace Interp::Startup(); if (debug || script_debug) { - SCM_DEVAL_P = 1; - SCM_RECORD_POSITIONS_P = 1; - SCM_BACKTRACE_P = 1; - SCM_RESET_DEBUG_MODE; + scm_c_eval_string("(debug-enable 'debug)" + "(debug-enable 'backtrace)" + "(read-enable 'positions)"); } #endif b = new Bot(configFile, debug); diff --git a/source/Makefile.am b/source/Makefile.am index 9a5958e..f0df95a 100644 --- a/source/Makefile.am +++ b/source/Makefile.am @@ -77,7 +77,8 @@ bobotpp_SOURCES = BanEntry.C \ ## what is up with telnet stuff? -bobotpp_LDADD = @GUILE_LDFLAGS@ +##bobotpp_LDFLAGS = @GUILE_LDFLAGS@ +##bototpp_CXXFLAGS = @GUILE_CFLAGS@ #bobot-scheme.scm: bobot-scheme.scm.in # sed -e 's|\!pkgdatadir\!|@datadir@\/bobotpp|g' bobot-scheme.scm.in > bobot-scheme.scm diff --git a/source/Parser.C b/source/Parser.C index 1dd60cb..bef907d 100644 --- a/source/Parser.C +++ b/source/Parser.C @@ -1,6 +1,6 @@ // Parser.C -*- C++ -*- // Copyright (c) 1997, 1998 Etienne BERNARD -// Copyright (C) 2002,2003,2005 Clinton Ebadi +// Copyright (C) 2002,2003,2005,2008 Clinton Ebadi // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -21,6 +21,7 @@ #include "config.h" #endif +#include #include #include diff --git a/source/ShitList.C b/source/ShitList.C index b1d3f27..2be1250 100644 --- a/source/ShitList.C +++ b/source/ShitList.C @@ -21,6 +21,7 @@ #include "config.h" #endif +#include #include #include "ShitList.H" diff --git a/source/String.C b/source/String.C index d60d0d5..15f173c 100644 --- a/source/String.C +++ b/source/String.C @@ -19,6 +19,7 @@ #include "String.H" #include "Utils.H" +#include #include #include #include @@ -189,7 +190,7 @@ String::operator[](int i_) const if (i < 0 || my_string.length () < i) { std::cerr << "String index out of range\n"; - exit(1); + std::exit(1); } return my_string[i]; } diff --git a/source/UserCommands.C b/source/UserCommands.C index d75a433..ee7b677 100644 --- a/source/UserCommands.C +++ b/source/UserCommands.C @@ -26,12 +26,13 @@ #include #include #include +#include #include #include #include #include #include -#include + #ifndef _X_OPEN_SOURCE #define _X_OPEN_SOURCE #endif @@ -41,6 +42,7 @@ #ifndef __USE_XOPEN #define __USE_XOPEN #endif + #include #include "Commands.H" @@ -995,7 +997,7 @@ UserCommands::NsLookup(ServerConnection *cnx, Person *from, } else { host = gethostbyname((const char *)target); if (host) { - memcpy((char *)&iaddr, (char *)host->h_addr, + std::memcpy((char *)&iaddr, (char *)host->h_addr, host->h_length); from->sendNotice(target + " \002has\002 " + inet_ntoa(iaddr) + " \002for IP address.\002"); -- 2.20.1