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:
parent
ab1fd9a1e2
commit
08edfd513f
9 changed files with 70 additions and 38 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -21,7 +21,7 @@ src/autoconf/aclocal.m4
|
||||||
src/autoconf/autom4te.cache
|
src/autoconf/autom4te.cache
|
||||||
src/config.h
|
src/config.h
|
||||||
src/config.status
|
src/config.status
|
||||||
src/configure
|
src/configure-do
|
||||||
src/dftables
|
src/dftables
|
||||||
src/efun_defs.c
|
src/efun_defs.c
|
||||||
src/instrs.h
|
src/instrs.h
|
||||||
|
@ -44,5 +44,4 @@ src/util/erq/Makefile
|
||||||
src/util/erq/erq
|
src/util/erq/erq
|
||||||
src/util/indent/Makefile
|
src/util/indent/Makefile
|
||||||
src/util/xerq/Makefile
|
src/util/xerq/Makefile
|
||||||
src/version.sh
|
|
||||||
src/y.output
|
src/y.output
|
||||||
|
|
|
@ -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)
|
2010-05-23 (lynX) (4.0.13)
|
||||||
- added fix for the iconv detection to configure script by spigot. thx!!
|
- added fix for the iconv detection to configure script by spigot. thx!!
|
||||||
|
|
||||||
|
|
58
INSTALL
58
INSTALL
|
@ -14,10 +14,9 @@ psyclpc & LDMud Notes
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
psyclpc is a variant of the LPC language optimized for psyced.
|
psyclpc is a variant of the LPC language optimized for psyced.
|
||||||
When using this driver distribution "./configure" will restart
|
When using this driver distribution "./configure" will use the
|
||||||
itself as "./configure --with-setting psyced". This will run
|
GNU build system to generate the actual configure-do script,
|
||||||
configure with all the sane options necessary for a pleasant
|
then run it using psyced settings.
|
||||||
psyclpc experience tuned to psyced requirements.
|
|
||||||
|
|
||||||
See also http://lpc.psyc.eu and http://about.psyc.eu/psyclpc
|
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
|
settings directory and run it. All the new functions of psyclpc
|
||||||
will then automatically default to LDMud-compatible behaviour.
|
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
|
Unix or Unix-like system
|
||||||
------------------------
|
------------------------
|
||||||
|
@ -41,14 +32,15 @@ Unix or Unix-like system
|
||||||
The driver uses a standard autoconfiguration system which on most
|
The driver uses a standard autoconfiguration system which on most
|
||||||
systems does all the work for you (for exceptions see below).
|
systems does all the work for you (for exceptions see below).
|
||||||
To prepare the compilation, execute the 'configure' script from
|
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
|
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
|
(from Makefile.in) and config.h (from config.h.in). We'll come back to
|
||||||
config.h below.
|
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:
|
but the most important are these:
|
||||||
|
|
||||||
--prefix=PREFIX: the base directory for the mud installation,
|
--prefix=PREFIX: the base directory for the mud installation,
|
||||||
|
@ -68,26 +60,26 @@ Unix or Unix-like system
|
||||||
argument.
|
argument.
|
||||||
|
|
||||||
A lot of the drivers parameters can be tweaked for better performance; these
|
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
|
which provides sensible defaults for all parameters for which no explicite
|
||||||
setting is provided. To tweak a setting yourself, pass the argument
|
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.
|
the commandline.
|
||||||
|
|
||||||
Alternatively, the indivial specifications can be collected in a settings
|
Alternatively, the indivial specifications can be collected in a settings
|
||||||
file, which is stored in the directory src/settings/. To use the
|
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
|
file src/settings/default documents the available settings. The setting
|
||||||
files are self-executing: './settings/<foo> [<extra-configure-args>]' will
|
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
|
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
|
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
|
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.
|
game driver.
|
||||||
|
|
||||||
|
|
||||||
|
@ -123,7 +115,7 @@ Unix or Unix-like system
|
||||||
basic form 'xlc' works with the configuration script.
|
basic form 'xlc' works with the configuration script.
|
||||||
Start the script as:
|
Start the script as:
|
||||||
|
|
||||||
CC=xlc ./configure ...
|
CC=xlc ./configure-do ...
|
||||||
|
|
||||||
DEC Ultrix:
|
DEC Ultrix:
|
||||||
Depending on the system configuration you might be unable to
|
Depending on the system configuration you might be unable to
|
||||||
|
@ -154,7 +146,7 @@ Unix or Unix-like system
|
||||||
IPv6
|
IPv6
|
||||||
----
|
----
|
||||||
If your machine supports IPv6, the driver can be configured to use it: give
|
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
|
Beware: the driver support is rudimentary, experimental, and may cease to
|
||||||
function on the next full moon. Additional work is necessary to really
|
function on the next full moon. Additional work is necessary to really
|
||||||
|
@ -184,7 +176,7 @@ IPv6
|
||||||
mySQL
|
mySQL
|
||||||
-----
|
-----
|
||||||
If your machine has mySQL installed, the driver can be configured to use
|
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,
|
Alternatively, if your mySQL uses an unusual include/library path,
|
||||||
the option can be given as '--enable-use-mysql=/unusual/path', which
|
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
|
Advantage of this method is that the Makefile allows cross-compilation
|
||||||
and covers Be specifics like file icon, type and version.
|
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
|
In general just follow the instructions given for Unix systems, but
|
||||||
be aware of the follwing:
|
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
|
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
|
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.
|
- the created executable will have neither icon nor type.
|
||||||
- cross compilation is not supported.
|
- cross compilation is not supported.
|
||||||
|
@ -309,15 +301,15 @@ OS/2
|
||||||
otherwise the make program will stop with an error. In the EPM editor
|
otherwise the make program will stop with an error. In the EPM editor
|
||||||
this can be achieved using the 'save -u' command.
|
this can be achieved using the 'save -u' command.
|
||||||
|
|
||||||
If you have the full GNU suite installed, you can also configure the
|
If you have the full GNU suite installed, you can also configure-do the
|
||||||
driver as under Unix. Following caveats regarding the configure script:
|
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 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.
|
- 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.
|
HAVE_GETRUSAGE, GETRUSAGE_RESTRICTED, GETRUSAGE_VIA_SYSCALL and RUSAGE_USEC.
|
||||||
Copy these values from the provided machine.h
|
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.
|
version 2.50 or newer.
|
||||||
|
|
||||||
|
|
|
@ -168,7 +168,7 @@ clean:
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
$(RM) @PROGNAME@@EXEEXT@ config.status machine.h Makefile config.cache config.log
|
$(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
|
$(RM) util/Makefile util/erq/Makefile
|
||||||
|
|
||||||
tags: $(SRC)
|
tags: $(SRC)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
../configure: configure.in configure.head Makefile
|
../configure-do: configure.in configure.head Makefile
|
||||||
autoreconf
|
autoreconf
|
||||||
rm -f $@
|
rm -f $@
|
||||||
cat configure.head configure >>$@
|
cat configure.head configure >>$@
|
||||||
|
|
9
src/configure
vendored
Executable file
9
src/configure
vendored
Executable 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
|
|
@ -25,7 +25,7 @@
|
||||||
# configure will strip this part from the script.
|
# configure will strip this part from the script.
|
||||||
|
|
||||||
cp $0 settings/psyced-current
|
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
|
exit
|
||||||
|
|
||||||
#-- PSYCLPC TUNINGS
|
#-- PSYCLPC TUNINGS
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#if defined(HAVE_STDLIB_H) || defined(AMIGA)
|
#if defined(HAVE_STDLIB_H) || defined(AMIGA)
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
26
src/version.sh
Normal file
26
src/version.sh
Normal 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
|
||||||
|
|
Loading…
Reference in a new issue