1
0
Fork 0
mirror of git://git.psyced.org/git/psyclpc synced 2024-08-15 03:20:16 +00:00

new configure procedure as suggested by nedko

This commit is contained in:
psyc://psyced.org/~lynX 2010-06-21 14:06:57 +02:00
parent ab1fd9a1e2
commit 08edfd513f
9 changed files with 70 additions and 38 deletions

3
.gitignore vendored
View file

@ -21,7 +21,7 @@ src/autoconf/aclocal.m4
src/autoconf/autom4te.cache
src/config.h
src/config.status
src/configure
src/configure-do
src/dftables
src/efun_defs.c
src/instrs.h
@ -44,5 +44,4 @@ src/util/erq/Makefile
src/util/erq/erq
src/util/indent/Makefile
src/util/xerq/Makefile
src/version.sh
src/y.output

View file

@ -1,3 +1,8 @@
2010-06-21 (nedko/lynX) (4.0.14)
- removed traditional configure script from distribution
new ./configure uses autotools to generate the configure script
then runs it with the psyced defaults
2010-05-23 (lynX) (4.0.13)
- added fix for the iconv detection to configure script by spigot. thx!!

58
INSTALL
View file

@ -14,10 +14,9 @@ psyclpc & LDMud Notes
---------------------
psyclpc is a variant of the LPC language optimized for psyced.
When using this driver distribution "./configure" will restart
itself as "./configure --with-setting psyced". This will run
configure with all the sane options necessary for a pleasant
psyclpc experience tuned to psyced requirements.
When using this driver distribution "./configure" will use the
GNU build system to generate the actual configure-do script,
then run it using psyced settings.
See also http://lpc.psyc.eu and http://about.psyc.eu/psyclpc
@ -26,14 +25,6 @@ psyclpc & LDMud Notes
settings directory and run it. All the new functions of psyclpc
will then automatically default to LDMud-compatible behaviour.
Also running "./configure" with *any* parameters will keep it
from loading psyced behaviour. Expect psyced not to work with
such a driver. It will probably fail with one of these messages:
psyclpc: Unknown option '--tls-key'.
Failed to load master object 'secure/master'.
Unix or Unix-like system
------------------------
@ -41,14 +32,15 @@ Unix or Unix-like system
The driver uses a standard autoconfiguration system which on most
systems does all the work for you (for exceptions see below).
To prepare the compilation, execute the 'configure' script from
within the src/ directory.
within the src/ directory. This will run the GNU autotools
to generate a configure-do script, then run it.
configure checks for a number of site specific settings and uses this
configure-do checks for a number of site specific settings and uses this
information to create the files machine.h (from machine.h.in), Makefile
(from Makefile.in) and config.h (from config.h.in). We'll come back to
config.h below.
configure takes a lot of arguments (--help will tell you everything),
configure-do takes a lot of arguments (--help will tell you everything),
but the most important are these:
--prefix=PREFIX: the base directory for the mud installation,
@ -68,26 +60,26 @@ Unix or Unix-like system
argument.
A lot of the drivers parameters can be tweaked for better performance; these
parameters are defined in config.h . This file too is created by configure,
parameters are defined in config.h . This file too is created by configure-do,
which provides sensible defaults for all parameters for which no explicite
setting is provided. To tweak a setting yourself, pass the argument
'--enable-<option>=yes|no' resp. '--with-<option>=<value>' to configure on
'--enable-<option>=yes|no' resp. '--with-<option>=<value>' to configure-do on
the commandline.
Alternatively, the indivial specifications can be collected in a settings
file, which is stored in the directory src/settings/. To use the
setting file <osb>, give '--with-<osb>' as argument to configure. The
setting file <osb>, give '--with-<osb>' as argument to configure-do. The
file src/settings/default documents the available settings. The setting
files are self-executing: './settings/<foo> [<extra-configure-args>]' will
start configure with the proper commandline arguments.
start configure-do with the proper commandline arguments.
The following environment variables can be used to tweak the behaviour
of the configure script:
of the configure-do script:
CC: the name of the C compiler
CFLAGS: compiler flags to be used during the configure script
CFLAGS: compiler flags to be used during the configure-do script
EXTRA_CFLAGS: compiler flags to be used when compiling the game driver
LDFLAGS: linker flags to be used by configure and for linking the
LDFLAGS: linker flags to be used by configure-do and for linking the
game driver.
@ -123,7 +115,7 @@ Unix or Unix-like system
basic form 'xlc' works with the configuration script.
Start the script as:
CC=xlc ./configure ...
CC=xlc ./configure-do ...
DEC Ultrix:
Depending on the system configuration you might be unable to
@ -154,7 +146,7 @@ Unix or Unix-like system
IPv6
----
If your machine supports IPv6, the driver can be configured to use it: give
'--enable-use-ipv6=yes' as argument to the configure script.
'--enable-use-ipv6=yes' as argument to the configure-do script.
Beware: the driver support is rudimentary, experimental, and may cease to
function on the next full moon. Additional work is necessary to really
@ -184,7 +176,7 @@ IPv6
mySQL
-----
If your machine has mySQL installed, the driver can be configured to use
it: give '--enable-use-mysql=yes' as argument to the configure script.
it: give '--enable-use-mysql=yes' as argument to the configure-do script.
Alternatively, if your mySQL uses an unusual include/library path,
the option can be given as '--enable-use-mysql=/unusual/path', which
@ -214,19 +206,19 @@ BeOS
Advantage of this method is that the Makefile allows cross-compilation
and covers Be specifics like file icon, type and version.
2. Use the Unix configure mechanism.
2. Use the configure-do mechanism.
In general just follow the instructions given for Unix systems, but
be aware of the follwing:
- If the configure script doesn't properly work, try starting it
- If the configure-do script doesn't properly work, try starting it
with
CC="$BE_C_COMPILER" EXTRA_CFLAGS="$BE_DEFAULT_C_FLAGS" ./configure
CC="$BE_C_COMPILER" EXTRA_CFLAGS="$BE_DEFAULT_C_FLAGS" ./configure-do
or (especially on BeOS R4.5 on PPC) even
CC=cc EXTRA_CFLAGS="$BE_DEFAULT_C_FLAGS" ./configure
CC=cc EXTRA_CFLAGS="$BE_DEFAULT_C_FLAGS" ./configure-do
- the created executable will have neither icon nor type.
- cross compilation is not supported.
@ -309,15 +301,15 @@ OS/2
otherwise the make program will stop with an error. In the EPM editor
this can be achieved using the 'save -u' command.
If you have the full GNU suite installed, you can also configure the
driver as under Unix. Following caveats regarding the configure script:
If you have the full GNU suite installed, you can also configure-do the
driver as under Unix. Following caveats regarding the configure-do script:
- the ac_exeext variable may not be set to '.exe' as it should be;
- the calls to the program conftest may lack the ${ac_exeext} extension.
Additionally, configure does not properly recognize the settings for
Additionally, configure-do does not properly recognize the settings for
HAVE_GETRUSAGE, GETRUSAGE_RESTRICTED, GETRUSAGE_VIA_SYSCALL and RUSAGE_USEC.
Copy these values from the provided machine.h
To recreate the configure script from configure.in, you need autoconf
To recreate the configure-do script from configure.in, you need autoconf
version 2.50 or newer.

View file

@ -168,7 +168,7 @@ clean:
distclean: clean
$(RM) @PROGNAME@@EXEEXT@ config.status machine.h Makefile config.cache config.log
$(RM) config.h config.status config.status.old
$(RM) config.h config.status config.status.old configure-do
$(RM) util/Makefile util/erq/Makefile
tags: $(SRC)

View file

@ -1,4 +1,4 @@
../configure: configure.in configure.head Makefile
../configure-do: configure.in configure.head Makefile
autoreconf
rm -f $@
cat configure.head configure >>$@

9
src/configure vendored Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
# first generate the actual configure script
if test ! -f "configure.do" ; then
(cd autoconf;make)
fi
# then run it with psyced defaults
settings/psyced

View file

@ -25,7 +25,7 @@
# configure will strip this part from the script.
cp $0 settings/psyced-current
exec ./configure --prefix=/opt/psyced --bindir=/opt/psyced/bin --libdir=/opt/psyced/world --libexec=/opt/psyced/run --with-setting=psyced-current $*
exec ./configure-do --prefix=/opt/psyced --bindir=/opt/psyced/bin --libdir=/opt/psyced/world --libexec=/opt/psyced/run --with-setting=psyced-current $*
exit
#-- PSYCLPC TUNINGS

View file

@ -17,6 +17,7 @@
*/
#include <stdio.h>
#include <string.h>
#if defined(HAVE_STDLIB_H) || defined(AMIGA)
# include <stdlib.h>
#endif

26
src/version.sh Normal file
View file

@ -0,0 +1,26 @@
# This file defines a number of shell variables to describe the projects
# version. It is meant to be modified by the bumpversion script.
# The checkin date
version_date=$(echo "\$Date: 2009-01-12 21:08:20 -0700 (Mon, 12 Jan 2009) $" | sed -e 's/[$]Date: \([0-9]*-[0-9]*-[0-9]*\).*\$/\1/')
# The checkin time
version_time=$(echo "\$Date: 2009-01-12 21:08:20 -0700 (Mon, 12 Jan 2009) $" | sed -e 's/[$]Date: \([0-9]*-[0-9]*-[0-9]*\) \([0-9]*:[0-9]*:[0-9]*\).*\$/\2/')
# The checkin revision
version_revision=$(echo "\$Revision: 2483 $" | sed -e 's/[$]Revision: \([0-9][0-9]*\) *\$/\1/')
# The version type: dev, stable, maintenance, release
version_type="stable"
version_longtype="stable"
# A timestamp, to be used by bumpversion and other scripts.
# It can be used, for example, to 'touch' this file on every build, thus
# forcing revision control systems to add it on every checkin automatically.
version_stamp="Mon Jun 21 13:52:21 CEST 2010"
# Okay, LDMUD is using 3.x.x so to avoid conflicts let's just use 4.x.x
version_major=4
version_minor=0
version_micro=14