6
if test "$prefix" = "NONE"; then
9
echo "Installing into ${prefix}"
14
#routines to check for PIKE
17
AC_HELP_STRING([--with-pike[=binary]],[Use the specified Pike.]),
19
if test ! -z "$withval" -a "$withval" != "yes"; then
20
extpike="`type $withval |sed "s:$withval is ::" 2>/dev/null`"
21
if test "$extpike" != ""; then
24
if test -f "$withval" -a ! -x "$withval" ; then
25
echo "$withval is not an executable file"
27
elif test -x "$withval" -a -f "$withval"; then
30
echo "$withval doesn't exist or isn't an executable file."
37
AC_MSG_CHECKING(for a working Pike)
39
pathpike="`type pike |sed 's/pike is//' 2>/dev/null`"
40
if test "$prefix" != "NONE"; then
44
for path in $DEFPIKE $PREFIXPIKE/bin/pike $pathpike/bin/pike /usr/local/bin/pike /opt/pike/bin/pike /sw/bin/pike /sw/local/opt/local/bin/pike /usr/gnu/bin/pike /usr/bin/pike ; do
45
if test "x$PIKE" != "x" ; then
51
if test -x $path; then
53
AC_MSG_RESULT("Pike is $PIKE")
54
if $PIKE -e 'float v; int rel;sscanf(version(), "Pike v%f release %d", v, rel);v += rel/10000.0; if(v < 7.4) exit(1); exit(0);'; then
55
PIKE_VERSION="`${PIKE} -e 'int v,sv;sscanf(version(),\"Pike v%d.%d %*s\", v, sv); write(v+\".\"+sv);exit(0);'`"
56
PIKE_VERSION_STR="`${PIKE} -e 'write(version());exit(0);'`"
57
PIKE_FULL_VERSION="`${PIKE} -e 'int v,sv,svv;sscanf(version(),\"Pike v%d.%d release %d %*s\", v, sv,svv); write(v+\".\"+sv+\".\"+svv);exit(0);'`"
58
PIKE_MODULE_DIR="`$PIKE --show-paths 2>&1| grep lib|grep modules|head -1 | sed -e 's/.*: //'`"
59
PIKE_INCLUDE_DIRS="-I`echo "$PIKE_MODULE_DIR" | sed -e 's,lib/pike/modules,include/pike,' -e 's,lib/modules,include/pike,'`"
61
for b in include/pike pike/${PIKE_VERSION}/include/pike include/pike${PIKE_VERSION}/include include/pike${PIKE_VERSION} pike/${PIKE_FULL_VERSION}/include/pike include/pike/${PIKE_FULL_VERSION} include/pike/pike${PIKE_VERSION}; do
62
PIKE_C_INCLUDE=${a}/${b}
63
AC_MSG_CHECKING("C_INCLUDE_DIR=${PIKE_C_INCLUDE}")
64
if test -f $PIKE_C_INCLUDE/global.h; then
65
PIKE_INCLUDE_PREFIX="${PIKE_C_INCLUDE}"
68
if test -d $PIKE_C_INCLUDE; then
69
PIKE_INCLUDE_DIRS="$PIKE_INCLUDE_DIRS -I$PIKE_INCLUDE_PREFIX"
72
AC_MSG_RESULT(not found)
78
export PIKE_INCLUDE_PREFIX PIKE_INCLUDE_DIRS PIKE PIKE_VERSION
79
AC_SUBST(PIKE_INCLUDE_DIRS)
81
AC_SUBST(PIKE_VERSION)
82
AC_SUBST(PIKE_VERSION_STR)
83
AC_SUBST(PIKE_FULL_VERSION)
85
if test "x$PIKE" = "x"; then
86
AC_MSG_ERROR(Pike is required for sTeam to run)
92
AC_HELP_STRING([--with-brand@<:@=brand_name@:>@],[Specify the name to use for the steam folders and database. Only alphanumeric characters are allowed, and the name must start with a letter, not a number. Also, don't use a name that you already use as a database name. This will be used as the folder name for configs, logs and server and as the database name, unless overridden. Default: steam]),
94
echo "$withval ... trying..."
102
AC_ARG_WITH(installdir,
103
AC_HELP_STRING([--with-installdir@<:@=installdir@:>@],[Use the specified install dir. This will be prepended to the prefix variable. Default is: /.]),
105
echo "$withval ... trying..."
106
installdir="$withval"
108
installdir=`echo "$installdir" | sed 's,//*,/,g'`
113
configdir=/etc/$brand
114
AC_ARG_WITH(configdir,
115
AC_HELP_STRING([--with-configdir@<:@=config-dir@:>@],[Use the specified dir for config files. Default: /etc/steam.]),
117
echo "$withval ... trying..."
120
configdir=`echo "$configdir" | sed 's,//*,/,g'`
125
logdir=/var/log/$brand
127
AC_HELP_STRING([--with-logdir@<:@=logdir@:>@],[Use the specified dir for log files. Default: /var/log/steam.]),
129
echo "$withval ... trying..."
132
logdir=`echo "$logdir" | sed 's,//*,/,g'`
137
steamdir=/$prefix/lib/$brand
138
AC_ARG_WITH(steamdir,
139
AC_HELP_STRING([--with-steamdir@<:@=steam-dir@:>@],[Use the specified dir for the steam server files. Default: /usr/local/lib/steam (or /usr/lib/steam, depending on your prefix).]),
141
echo "$withval ... trying..."
144
steamdir=`echo "$steamdir" | sed 's,//*,/,g'`
149
AC_ARG_WITH(javahome,
150
AC_HELP_STRING([--with-javahome@<:@=java_install_dir@:>@],[Specify the directory where java is installed (e.g. /usr/java/j2sdk_1.4.0). Default is: \$JAVA_HOME.]),
152
echo "$withval ... trying..."
158
AC_CONFIG_SUBDIRS(sources spm)
159
AC_CONFIG_FILES(setup version distrib/redhat/init.d/steam distrib/suse/init.d/steam distrib/generic/init.d/steam tools/debug.pike tools/export tools/export_users tools/import tools/create_cert.pike server/include/configure.h)
163
chmod +x distrib/redhat/init.d/steam
164
chmod +x distrib/suse/init.d/steam
165
chmod +x distrib/generic/init.d/steam