diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-10-25 12:31:35 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-10-25 12:35:43 +0200 |
commit | a931fa498a64d575c543aaa016fdd75f6e7bc6ec (patch) | |
tree | 676fcc81a5193298b1843d3e98fc7bf88078d000 | |
parent | a0227ae78b07b60d59c81b9db38a3e5bd55dbf45 (diff) | |
download | manaserv-a931fa498a64d575c543aaa016fdd75f6e7bc6ec.tar.gz manaserv-a931fa498a64d575c543aaa016fdd75f6e7bc6ec.tar.bz2 manaserv-a931fa498a64d575c543aaa016fdd75f6e7bc6ec.tar.xz manaserv-a931fa498a64d575c543aaa016fdd75f6e7bc6ec.zip |
Removed obsolete autoconf files
Replaced by cmake.
-rw-r--r-- | .gitignore | 19 | ||||
-rw-r--r-- | INSTALL | 366 | ||||
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | acinclude.m4 | 183 | ||||
-rw-r--r-- | ax_compare_version.m4 | 162 | ||||
-rw-r--r-- | configure.ac | 125 | ||||
-rw-r--r-- | src/Makefile.am | 229 |
8 files changed, 3 insertions, 1090 deletions
@@ -1,21 +1,3 @@ -# files generated by autoreconf -Makefile.in -aclocal.m4 -autom4te.cache -config.h.in -configure -depcomp -install-sh -missing - -# files generated by configure -Makefile -config.h -config.log -config.status -.deps -stamp-h1 - # files generated during build *.o *.moc @@ -43,6 +25,7 @@ manaserv.stats manaserv.xml # files created by CMake +Makefile CMakeFiles/ CMakeCache.txt cmake_install.cmake @@ -1,365 +1 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008, 2009 Free Software Foundation, Inc. - - Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. This file is offered as-is, -without warranty of any kind. - -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. Some packages provide this -`INSTALL' file but do not implement all of the features documented -below. The lack of an optional feature in a given package is not -necessarily a bug. More recommendations for GNU packages can be found -in *note Makefile Conventions: (standards)Makefile Conventions. - - 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, generally using the just-built uninstalled binaries. - - 4. Type `make install' to install the programs and any data files and - documentation. When installing into a prefix owned by root, it is - recommended that the package be configured and built as a regular - user, and only the `make install' phase executed with root - privileges. - - 5. Optionally, type `make installcheck' to repeat any self-tests, but - this time using the binaries in their final installed location. - This target does not install anything. Running this target as a - regular user, particularly if the prior `make install' required - root privileges, verifies that the installation completed - correctly. - - 6. 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. - - 7. Often, you can also type `make uninstall' to remove the installed - files again. In practice, not all packages have tested that - uninstallation works correctly, even though it is required by the - GNU Coding Standards. - - 8. Some packages, particularly those that use Automake, provide `make - distcheck', which can by used by developers to test that all other - targets like `make install' and `make uninstall' work correctly. - This target is generally not run by end users. - -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 `..'. This -is known as a "VPATH" build. - - 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. - - On MacOS X 10.5 and later systems, you can create libraries and -executables that work on multiple system types--known as "fat" or -"universal" binaries--by specifying multiple `-arch' options to the -compiler but only a single `-arch' option to the preprocessor. Like -this: - - ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CPP="gcc -E" CXXCPP="g++ -E" - - This is not guaranteed to produce working output in all cases, you -may have to build one architecture at a time and combine the results -using the `lipo' tool if you have problems. - -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', where PREFIX must be an -absolute file name. - - 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. In general, the -default for these options is expressed in terms of `${prefix}', so that -specifying just `--prefix' will affect all of the other directory -specifications that were not explicitly provided. - - The most portable way to affect installation locations is to pass the -correct locations to `configure'; however, many packages provide one or -both of the following shortcuts of passing variable assignments to the -`make install' command line to change installation locations without -having to reconfigure or recompile. - - The first method involves providing an override variable for each -affected directory. For example, `make install -prefix=/alternate/directory' will choose an alternate location for all -directory configuration variables that were expressed in terms of -`${prefix}'. Any directories that were specified during `configure', -but not in terms of `${prefix}', must each be overridden at install -time for the entire installation to be relocated. The approach of -makefile variable overrides for each directory variable is required by -the GNU Coding Standards, and ideally causes no recompilation. -However, some platforms have known limitations with the semantics of -shared libraries that end up requiring recompilation when using this -method, particularly noticeable in packages that use GNU Libtool. - - The second method involves providing the `DESTDIR' variable. For -example, `make install DESTDIR=/alternate/directory' will prepend -`/alternate/directory' before all installation names. The approach of -`DESTDIR' overrides is not required by the GNU Coding Standards, and -does not work on platforms that have drive letters. On the other hand, -it does better at avoiding recompilation issues, and works well even -when some directory options were not specified in terms of `${prefix}' -at `configure' time. - -Optional Features -================= - - 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'. - - 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. - - Some packages offer the ability to configure how verbose the -execution of `make' will be. For these packages, running `./configure ---enable-silent-rules' sets the default to minimal output, which can be -overridden with `make V=1'; while running `./configure ---disable-silent-rules' sets the default to verbose, which can be -overridden with `make V=0'. - -Particular systems -================== - - On HP-UX, the default C compiler is not ANSI C compatible. If GNU -CC is not installed, it is recommended to use the following options in -order to use an ANSI C compiler: - - ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" - -and if that doesn't work, install pre-built binaries of GCC for HP-UX. - - On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot -parse its `<wchar.h>' header file. The option `-nodtk' can be used as -a workaround. If GNU CC is not installed, it is therefore recommended -to try - - ./configure CC="cc" - -and if that doesn't work, try - - ./configure CC="cc -nodtk" - - On Solaris, don't put `/usr/ucb' early in your `PATH'. This -directory contains several dysfunctional programs; working variants of -these programs are available in `/usr/bin'. So, if you need `/usr/ucb' -in your `PATH', put it _after_ `/usr/bin'. - - On Haiku, software installed for all users goes in `/boot/common', -not `/usr/local'. It is recommended to use the following options: - - ./configure --prefix=/boot/common - -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 all of the options to `configure', and exit. - -`--help=short' -`--help=recursive' - Print a summary of the options unique to this package's - `configure', and exit. The `short' variant lists options used - only in the top level, while the `recursive' variant lists options - also present in any nested packages. - -`--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. - -`--prefix=DIR' - Use DIR as the installation prefix. *note Installation Names:: - for more details, including other options available for fine-tuning - the installation locations. - -`--no-create' -`-n' - Run the configure checks, but stop before creating any output - files. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - +TODO: Document installation procedure diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index b447daa9..00000000 --- a/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -# Subdirectories to include in a distribution -DIST_SUBDIRS = src - -# Subdirectories to build -SUBDIRS = src @@ -6,14 +6,12 @@ COMPILATION Before trying to compile, make sure all the dependencies are installed. For each dependency the Ubuntu package name is listed as well as the website. - * Enet (libenet-dev) - http://enet.bespin.org/ * libxml2 (libxml2-dev) - http://xmlsoft.org/ * Lua (liblua5.1-0-dev) - http://lua.org/ * PhysFS (libphysfs-dev) - http://icculus.org/physfs/ * SQLite 3 (libsqlite3-dev) - http://sqlite.org/ -0) autoreconf -i (when you cloned via git) -1) ./configure +1) cmake . 2) make The compilation should produce two binaries: diff --git a/acinclude.m4 b/acinclude.m4 deleted file mode 100644 index 00c0da97..00000000 --- a/acinclude.m4 +++ /dev/null @@ -1,183 +0,0 @@ -dnl $Id$ - -dnl @synopsis AC_CHECK_LIB_MANA( -dnl LIBRARY -dnl [, MINIMUM-VERSION -dnl [, LIBRARY-CONFIG-EXE -dnl [, ACTION-IF-FOUND -dnl [, ACTION-IF-NOT-FOUND ]]]] -dnl ) -dnl -dnl This function runs a LIBRARY-config script (or LIBRARY-CONFIG-EXE if -dnl specified) and defines LIBRARY_CFLAGS and LIBRARY_LIBS. -dnl -dnl The script must support `--cflags' and `--libs' args. -dnl If MINIMUM-VERSION is specified, the script must also support the -dnl `--version' arg. -dnl If the `--with-library-[exec-]prefix' arguments to ./configure are given, -dnl it must also support `--prefix' and `--exec-prefix'. -dnl (In other words, it must be like gtk-config.) -dnl -dnl Example: -dnl -dnl AC_CHECK_LIB_MANA(foo, 1.0.0) -dnl -dnl would run `foo-config --version' and check that it is at least 1.0.0. -dnl -dnl If so, the following would then be defined: -dnl -dnl FOO_CFLAGS to `foo-config --cflags` -dnl FOO_LIBS to `foo-config --libs` -dnl -dnl This function is a hack of the original ac_path_generic.m4 written by -dnl Angus Lees <gusl@cse.unsw.edu.au>. -dnl It adds LIBRARY-CONFIG-EXE so that it is possible to define `foo_config` -dnl as the script to execute instead of the default `foo-config`. - -m4_include(ax_compare_version.m4) - -AC_DEFUN([AC_CHECK_LIB_MANA], [ - dnl define macros to uppercase or lowercase a string. - pushdef([UP], translit([$1], [a-z], [A-Z]))dnl - pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl - - dnl add two options to the configure script to set the prefix and - dnl the exec-prefix of the library. - AC_ARG_WITH( - DOWN-prefix, - AS_HELP_STRING( - [--with-DOWN-prefix=PREFIX], - [prefix where lib$1 is installed (optional)] - ), - [DOWN[]_config_prefix="$withval"], - [DOWN[]_config_prefix=""] - ) - - AC_ARG_WITH( - DOWN-exec-prefix, - AS_HELP_STRING( - [--with-DOWN-exec-prefix=EPREFIX], - [exec prefix where lib$1 is installed (optional)] - ), - [DOWN[]_config_exec_prefix="$withval"], - [DOWN[]_config_exec_prefix=""] - ) - - dnl set default shell script to execute. - ifelse( - [$3], - [], - [DOWN[]_config_script="DOWN-config"], - [DOWN[]_config_script="$3"] - ) - - dnl print an info message if we have detected the environment - dnl variable LIBRARY_CONFIG. - if test -n "${UP[]_CONFIG+set}"; then - AC_MSG_NOTICE( - [using UP[]_CONFIG=$UP[]_CONFIG found from your environment] - ) - fi - - if test -n "$DOWN[]_config_prefix"; then - DOWN[]_config_args=\ - "$DOWN[]_config_args --prefix=$DOWN[]_config_prefix" - - if test -z "${UP[]_CONFIG+set}"; then - [UP[]_CONFIG=$DOWN[]_config_prefix/bin/$DOWN[]_config_script] - fi - fi - - if test -n "$DOWN[]_config_exec_prefix"; then - DOWN[]_config_args=\ - "$DOWN[]_config_args --exec-prefix=$DOWN[]_config_exec_prefix" - - if test -z "${UP[]_CONFIG+set}"; then - [UP[]_CONFIG=$DOWN[]_config_exec_prefix/bin/$DOWN[]_config_script] - fi - fi - - succeeded=no - - if test -z "$UP[]_CONFIG"; then - AC_PATH_PROG(UP[]_CONFIG, $DOWN[]_config_script, [no]) - fi - - if test "$UP[]_CONFIG" = "no"; then - echo "*** The $DOWN[]_config_script script could not be found. Make" - echo "*** sure it is in your path, or set the UP[]_CONFIG environment" - echo "*** variable to the full path to $DOWN[]_config_script." - else - ifelse( - [$2], [], - AC_MSG_CHECKING([for $1]), - AC_MSG_CHECKING([for $1 - version >= $2]) - ) - - if test -x "$UP[]_CONFIG"; then - ifelse( - [$2], [], [], - [DOWN[]_version=`$UP[]_CONFIG $DOWN[]_config_args --version` - - AX_COMPARE_VERSION( - [$DOWN[]_version], [ge], [$2], - [], - [AC_MSG_RESULT([no]) - - UP[]_CFLAGS="" - UP[]_LIBS="" - - echo "***" - echo "*** If you have already installed a sufficiently new" - echo "*** version, this error probably means that the wrong" - echo "*** copy of the $DOWN[]_config_script shell script is" - echo "*** being found in your path." - echo "***" - - AC_MSG_ERROR([found $DOWN[]_version]) - ] - )] - ) - - AC_MSG_RESULT(yes) - succeeded="yes" - - AC_MSG_CHECKING(UP[]_CFLAGS) - UP[]_CFLAGS=`$UP[]_CONFIG $DOWN[]_config_args --cflags` - AC_MSG_RESULT($UP[]_CFLAGS) - - AC_MSG_CHECKING(UP[]_LIBS) - UP[]_LIBS=`$UP[]_CONFIG $DOWN[]_config_args --libs` - AC_MSG_RESULT($UP[]_LIBS) - else - AC_MSG_RESULT([could not execute $UP[]_CONFIG]) - - echo "***" - echo "*** The $UP[]_CONFIG shell script does not exist or" - echo "*** is not executable. Please check if the file exists and" - echo "*** is executable or update your UP[]_CONFIG environment" - echo "*** variable so that it points to an existing DOWN-config" - echo "*** shell script." - echo "***" - fi - fi - - dnl define output variables. - AC_SUBST(UP[]_CFLAGS) - AC_SUBST(UP[]_LIBS) - - if test "$succeeded" = "yes"; then - ifelse([$4], [], :, [$4]) - else - ifelse( - [$5], - [], - AC_MSG_ERROR([library requirements (>=$2) not met.]), - [$5] - ) - fi - - dnl undefine macros. - popdef([UP]) - popdef([DOWN]) -]) diff --git a/ax_compare_version.m4 b/ax_compare_version.m4 deleted file mode 100644 index bd6c51b2..00000000 --- a/ax_compare_version.m4 +++ /dev/null @@ -1,162 +0,0 @@ -dnl @synopsis AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -dnl -dnl This macro compares two version strings. It is used heavily in the -dnl macro _AX_PATH_BDB for library checking. Due to the various number -dnl of minor-version numbers that can exist, and the fact that string -dnl comparisons are not compatible with numeric comparisons, this is -dnl not necessarily trivial to do in a autoconf script. This macro -dnl makes doing these comparisons easy. -dnl -dnl The six basic comparisons are available, as well as checking -dnl equality limited to a certain number of minor-version levels. -dnl -dnl The operator OP determines what type of comparison to do, and can -dnl be one of: -dnl -dnl eq - equal (test A == B) -dnl ne - not equal (test A != B) -dnl le - less than or equal (test A <= B) -dnl ge - greater than or equal (test A >= B) -dnl lt - less than (test A < B) -dnl gt - greater than (test A > B) -dnl -dnl Additionally, the eq and ne operator can have a number after it to -dnl limit the test to that number of minor versions. -dnl -dnl eq0 - equal up to the length of the shorter version -dnl ne0 - not equal up to the length of the shorter version -dnl eqN - equal up to N sub-version levels -dnl neN - not equal up to N sub-version levels -dnl -dnl When the condition is true, shell commands ACTION-IF-TRUE are run, -dnl otherwise shell commands ACTION-IF-FALSE are run. The environment -dnl variable 'ax_compare_version' is always set to either 'true' or -dnl 'false' as well. -dnl -dnl Examples: -dnl -dnl AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8]) -dnl AX_COMPARE_VERSION([3.15],[lt],[3.15.8]) -dnl -dnl would both be true. -dnl -dnl AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8]) -dnl AX_COMPARE_VERSION([3.15],[gt],[3.15.8]) -dnl -dnl would both be false. -dnl -dnl AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8]) -dnl -dnl would be true because it is only comparing two minor versions. -dnl -dnl AX_COMPARE_VERSION([3.15.7],[eq0],[3.15]) -dnl -dnl would be true because it is only comparing the lesser number of -dnl minor versions of the two values. -dnl -dnl Note: The characters that separate the version numbers do not -dnl matter. An empty string is the same as version 0. OP is evaluated -dnl by autoconf, not configure, so must be a string, not a variable. -dnl -dnl The author would like to acknowledge Guido Draheim whose advice -dnl about the m4_case and m4_ifvaln functions make this macro only -dnl include the portions necessary to perform the specific comparison -dnl specified by the OP argument in the final configure script. -dnl -dnl @category Misc -dnl @author Tim Toolan <toolan@ele.uri.edu> -dnl @version 2004-03-01 -dnl @license GPLWithACException - -dnl ######################################################################### -AC_DEFUN([AX_COMPARE_VERSION], [ - # Used to indicate true or false condition - ax_compare_version=false - - # Convert the two version strings to be compared into a format that - # allows a simple string comparison. The end result is that a version - # string of the form 1.12.5-r617 will be converted to the form - # 0001001200050617. In other words, each number is zero padded to four - # digits, and non digits are removed. - AS_VAR_PUSHDEF([A],[ax_compare_version_A]) - A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ - -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/[[^0-9]]//g'` - - AS_VAR_PUSHDEF([B],[ax_compare_version_B]) - B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ - -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/[[^0-9]]//g'` - - dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary - dnl # then the first line is used to determine if the condition is true. - dnl # The sed right after the echo is to remove any indented white space. - m4_case(m4_tolower($2), - [lt],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"` - ], - [gt],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"` - ], - [le],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"` - ], - [ge],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"` - ],[ - dnl Split the operator from the subversion count if present. - m4_bmatch(m4_substr($2,2), - [0],[ - # A count of zero means use the length of the shorter version. - # Determine the number of characters in A and B. - ax_compare_version_len_A=`echo "$A" | awk '{print(length)}'` - ax_compare_version_len_B=`echo "$B" | awk '{print(length)}'` - - # Set A to no more than B's length and B to no more than A's length. - A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"` - B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"` - ], - [[0-9]+],[ - # A count greater than zero means use only that many subversions - A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` - B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` - ], - [.+],[ - AC_WARNING( - [illegal OP numeric parameter: $2]) - ],[]) - - # Pad zeros at end of numbers to make same length. - ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`" - B="$B`echo $A | sed 's/./0/g'`" - A="$ax_compare_version_tmp_A" - - # Check for equality or inequality as necessary. - m4_case(m4_tolower(m4_substr($2,0,2)), - [eq],[ - test "x$A" = "x$B" && ax_compare_version=true - ], - [ne],[ - test "x$A" != "x$B" && ax_compare_version=true - ],[ - AC_WARNING([illegal OP parameter: $2]) - ]) - ]) - - AS_VAR_POPDEF([A])dnl - AS_VAR_POPDEF([B])dnl - - dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE. - if test "$ax_compare_version" = "true" ; then - m4_ifvaln([$4],[$4],[:])dnl - m4_ifvaln([$5],[else $5])dnl - fi -]) dnl AX_COMPARE_VERSION diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 575023a2..00000000 --- a/configure.ac +++ /dev/null @@ -1,125 +0,0 @@ -AC_PREREQ(2.59) -AC_INIT([Mana Server], [1.0.0], [dev@manasource.org], [manaserv]) -AC_CONFIG_HEADER([config.h]) -AM_INIT_AUTOMAKE - - -# Checks for programs. -AC_PROG_CXX -AC_PROG_CC -AC_PROG_CPP -AC_PROG_RANLIB -AC_PROG_INSTALL - - -# Checks for libraries. - -AC_CHECK_LIB([physfs], [PHYSFS_init], , -AC_MSG_ERROR([ *** Unable to find PhysFS library (icculus.org/physfs/)])) - -AC_CHECK_LIB([enet], [enet_initialize], , -AC_MSG_ERROR([ *** Unable to find enet library (enet.bespin.org)])) - -PKG_CHECK_MODULES(XML2, [libxml-2.0 >= 2.4]) -CXXFLAGS="$CXXFLAGS $XML2_CFLAGS" -LIBS="$LIBS $XML2_LIBS" - - -# Checks for header files. -AC_HEADER_STDC -AC_HEADER_TIME -AC_CHECK_HEADERS([stdint.h]) - -# Checks for library functions. -AC_FUNC_VPRINTF -AC_CHECK_FUNCS([atexit]) - - -# Checks for the storage backend. -AC_ARG_WITH( - [storage-backend], - AS_HELP_STRING( - [--with-storage-backend=ARG], - [use storage backend [[ARG=mysql,postgresql,sqlite]] - [(default=sqlite)]] - ), - [if test "$withval" = "yes"; then - # default is sqlite. - with_storage_backend="sqlite" - elif test "$withval" = "no"; then - AC_MSG_ERROR([$PACKAGE_NAME cannot run without a storage backend.]) - else - with_storage_backend="$withval" - fi], - [with_storage_backend="sqlite"] -) - -if test "$with_storage_backend" = "mysql"; then - # use mysql_config to check libmysqlclient. - # MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LIBS are set by AC_CHECK_LIB_MANA. - AC_CHECK_LIB_MANA([mysqlclient], [4.1.0], [mysql_config]) - - # update CXXFLAGS and LIBS. - CXXFLAGS="$CXXFLAGS -DMYSQL_SUPPORT $MYSQLCLIENT_CFLAGS" - LIBS="$LIBS $MYSQLCLIENT_LIBS" -elif test "$with_storage_backend" = "postgresql"; then - # use pg_config to check libpq. - # PQ_CFLAGS and PQ_LIBS are set by AC_CHECK_LIB_MANA. - # NOTE: PQ_LIBS not set correctly - AC_CHECK_LIB_MANA([pq], [7.0.0], [pg_config]) - - # update CXXFLAGS and LIBS. - CXXFLAGS="$CXXFLAGS -DPOSTGRESQL_SUPPORT $PQ_CFLAGS" - PQ_LIBS="$PQ_LIBS -lpq" - LIBS="$LIBS $PQ_LIBS" -elif test "$with_storage_backend" = "sqlite"; then - # use pkg-config to check libsqlite3. - # SQLITE_CFLAGS and SQLITE_LIBS are set by PKG_CHECK_MODULES. - PKG_CHECK_MODULES(SQLITE,[sqlite3 >= 3.0.6]) - # update CXXFLAGS and LIBS. - CXXFLAGS="$CXXFLAGS $SQLITE_CFLAGS" - LIBS="$LIBS $SQLITE_LIBS" - AC_DEFINE(SQLITE_SUPPORT, [], [Define if the Sqlite back-end should be used.]) -else - # at the moment, we support only those three databases as backends. - AC_MSG_ERROR([unknown storage backend: $with_storage_backend]) -fi - - -# Checks for Lua support -AC_ARG_ENABLE( - [lua-engine], - AS_HELP_STRING([--disable-lua-engine], [do not support Lua scripts]), - [], - [enable_lua_engine="yes"] -) - -if test "$enable_lua_engine" = "yes"; then - PKG_CHECK_MODULES(LUA, [lua >= 5.1], , - [PKG_CHECK_MODULES(LUA, [lua5.1 >= 5.1], , - [AC_CHECK_LIB([lua-5.1], [lua_newstate], , - [AC_CHECK_LIB([lua], [lua_newstate], , - AC_MSG_ERROR([ *** Unable to find liblua 5.1]))])])]) - CXXFLAGS="$CXXFLAGS $LUA_CFLAGS" - LIBS="$LIBS $LUA_LIBS" -fi - -AM_CONDITIONAL(BUILD_MYSQL, test "$with_storage_backend" = "mysql") -AM_CONDITIONAL(BUILD_POSTGRESQL, test "$with_storage_backend" = "postgresql") -AM_CONDITIONAL(BUILD_SQLITE, test "$with_storage_backend" = "sqlite") - -AM_CONDITIONAL(BUILD_LUA, test "$enable_lua_engine" = "yes") - -AC_CONFIG_FILES([Makefile src/Makefile]) - -AC_OUTPUT - - -echo -echo "-------------------------------------------------------" -echo " $PACKAGE_NAME will be compiled with these options:" -echo -echo " + storage backend : $with_storage_backend" -echo " + Lua scripting engine: $enable_lua_engine" -echo "-------------------------------------------------------" -echo diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index d6669808..00000000 --- a/src/Makefile.am +++ /dev/null @@ -1,229 +0,0 @@ -AUTOMAKE_OPTIONS = subdir-objects - -bin_PROGRAMS = manaserv-account manaserv-game - -manaserv_account_CXXFLAGS = -Wall - -manaserv_account_SOURCES = \ - account-server/main-account.cpp \ - defines.h \ - protocol.h \ - point.h \ - account-server/account.hpp \ - account-server/account.cpp \ - account-server/accountclient.hpp \ - account-server/accountclient.cpp \ - account-server/accounthandler.hpp \ - account-server/accounthandler.cpp \ - account-server/character.hpp \ - account-server/character.cpp \ - account-server/serverhandler.hpp \ - account-server/serverhandler.cpp \ - account-server/storage.hpp \ - account-server/storage.cpp \ - chat-server/chathandler.hpp \ - chat-server/chathandler.cpp \ - chat-server/chatclient.hpp \ - chat-server/chatchannel.hpp \ - chat-server/chatchannel.cpp \ - chat-server/chatchannelmanager.hpp \ - chat-server/chatchannelmanager.cpp \ - chat-server/guild.hpp \ - chat-server/guild.cpp \ - chat-server/guildhandler.cpp \ - chat-server/guildmanager.hpp \ - chat-server/guildmanager.cpp \ - chat-server/party.cpp \ - chat-server/party.hpp \ - chat-server/partyhandler.cpp \ - chat-server/post.cpp \ - chat-server/post.hpp \ - common/configuration.hpp \ - common/configuration.cpp \ - common/inventorydata.hpp \ - common/resourcemanager.hpp \ - common/resourcemanager.cpp \ - dal/dalexcept.h \ - dal/dataprovider.h \ - dal/dataprovider.cpp \ - dal/dataproviderfactory.h \ - dal/dataproviderfactory.cpp \ - dal/recordset.h \ - dal/recordset.cpp \ - net/bandwidth.hpp \ - net/bandwidth.cpp \ - net/connectionhandler.hpp \ - net/connectionhandler.cpp \ - net/messagein.hpp \ - net/messagein.cpp \ - net/messageout.hpp \ - net/messageout.cpp \ - net/netcomputer.hpp \ - net/netcomputer.cpp \ - serialize/characterdata.hpp \ - utils/functors.h \ - utils/encryption.h \ - utils/encryption.cpp \ - utils/logger.h \ - utils/logger.cpp \ - utils/processorutils.hpp \ - utils/processorutils.cpp \ - utils/sha256.h \ - utils/sha256.cpp \ - utils/string.hpp \ - utils/string.cpp \ - utils/stringfilter.h \ - utils/stringfilter.cpp \ - utils/timer.cpp \ - utils/tokencollector.hpp \ - utils/tokencollector.cpp \ - utils/tokendispenser.hpp \ - utils/tokendispenser.cpp \ - utils/xml.hpp \ - utils/xml.cpp - -manaserv_game_CXXFLAGS = -Wall - -manaserv_game_SOURCES = \ - game-server/main-game.cpp \ - defines.h \ - protocol.h \ - point.h \ - common/configuration.hpp \ - common/configuration.cpp \ - common/inventorydata.hpp \ - common/permissionmanager.hpp \ - common/permissionmanager.cpp \ - common/resourcemanager.hpp \ - common/resourcemanager.cpp \ - game-server/accountconnection.hpp \ - game-server/accountconnection.cpp \ - game-server/actor.hpp \ - game-server/actor.cpp \ - game-server/attribute.hpp \ - game-server/attribute.cpp \ - game-server/attributemanager.hpp \ - game-server/attributemanager.cpp \ - game-server/autoattack.hpp \ - game-server/autoattack.cpp \ - game-server/being.hpp \ - game-server/being.cpp \ - game-server/buysell.hpp \ - game-server/buysell.cpp \ - game-server/character.hpp \ - game-server/character.cpp \ - game-server/collisiondetection.hpp \ - game-server/collisiondetection.cpp \ - game-server/command.cpp \ - game-server/commandhandler.cpp \ - game-server/commandhandler.hpp \ - game-server/effect.hpp \ - game-server/effect.cpp \ - game-server/eventlistener.hpp \ - game-server/gamehandler.hpp \ - game-server/gamehandler.cpp \ - game-server/inventory.hpp \ - game-server/inventory.cpp \ - game-server/item.hpp \ - game-server/item.cpp \ - game-server/itemmanager.hpp \ - game-server/itemmanager.cpp \ - game-server/map.hpp \ - game-server/map.cpp \ - game-server/mapcomposite.hpp \ - game-server/mapcomposite.cpp \ - game-server/mapmanager.hpp \ - game-server/mapmanager.cpp \ - game-server/mapreader.hpp \ - game-server/mapreader.cpp \ - game-server/monster.hpp \ - game-server/monster.cpp \ - game-server/monstermanager.hpp \ - game-server/monstermanager.cpp \ - game-server/npc.hpp \ - game-server/npc.cpp \ - game-server/postman.hpp \ - game-server/quest.hpp \ - game-server/quest.cpp \ - game-server/skillmanager.hpp \ - game-server/skillmanager.cpp \ - game-server/spawnarea.hpp \ - game-server/spawnarea.cpp \ - game-server/state.hpp \ - game-server/state.cpp \ - game-server/statuseffect.hpp \ - game-server/statuseffect.cpp \ - game-server/statusmanager.hpp \ - game-server/statusmanager.cpp \ - game-server/thing.hpp \ - game-server/thing.cpp \ - game-server/trade.hpp \ - game-server/trade.cpp \ - game-server/trigger.hpp \ - game-server/trigger.cpp \ - net/bandwidth.hpp \ - net/bandwidth.cpp \ - net/connection.hpp \ - net/connection.cpp \ - net/connectionhandler.hpp \ - net/connectionhandler.cpp \ - net/messagein.hpp \ - net/messagein.cpp \ - net/messageout.hpp \ - net/messageout.cpp \ - net/netcomputer.hpp \ - net/netcomputer.cpp \ - scripting/script.hpp \ - scripting/script.cpp \ - serialize/characterdata.hpp \ - utils/base64.h \ - utils/base64.cpp \ - utils/mathutils.h \ - utils/mathutils.cpp \ - utils/logger.h \ - utils/logger.cpp \ - utils/processorutils.hpp \ - utils/processorutils.cpp \ - utils/string.hpp \ - utils/string.cpp \ - utils/speedconv.hpp \ - utils/speedconv.cpp \ - utils/stringfilter.h \ - utils/stringfilter.cpp \ - utils/timer.h \ - utils/timer.cpp \ - utils/tokencollector.hpp \ - utils/tokencollector.cpp \ - utils/tokendispenser.hpp \ - utils/tokendispenser.cpp \ - utils/xml.hpp \ - utils/xml.cpp \ - utils/zlib.hpp \ - utils/zlib.cpp - -if BUILD_MYSQL -manaserv_account_SOURCES += \ - dal/mysqldataprovider.h \ - dal/mysqldataprovider.cpp -endif - -if BUILD_POSTGRESQL -manaserv_account_SOURCES += \ - dal/pqdataprovider.h \ - dal/pqdataprovider.cpp -endif - -if BUILD_SQLITE -manaserv_account_SOURCES += \ - dal/sqlitedataprovider.h \ - dal/sqlitedataprovider.cpp -endif - -if BUILD_LUA -manaserv_game_SOURCES += \ - scripting/lua.cpp \ - scripting/luascript.cpp \ - scripting/luascript.hpp \ - scripting/luautil.cpp \ - scripting/luautil.hpp -endif |