~ubuntu-branches/ubuntu/wily/steam/wily

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2013-10-29 19:51:18 UTC
  • mfrom: (1.1.4) (0.1.4 trusty-proposed)
  • Revision ID: package-import@ubuntu.com-20131029195118-b9bxciz5hwx5z459
Tags: 1:1.0.0.39-2ubuntu1
Add an epoch to the version number as there was an unrelated steam package
in the archive with a higher version number.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
AC_INIT(Makefile.in)
2
 
 
3
 
DIRS="sources"
4
 
AC_SUBST(DIRS)
5
 
 
6
 
if test "$prefix" = "NONE"; then
7
 
   prefix="/usr/local"
8
 
fi
9
 
echo "Installing into ${prefix}"
10
 
 
11
 
AC_SET_MAKE
12
 
AC_PROG_INSTALL
13
 
 
14
 
#routines to check for PIKE
15
 
 
16
 
AC_ARG_WITH(pike, 
17
 
AC_HELP_STRING([--with-pike[=binary]],[Use the specified Pike.]),
18
 
[
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
22
 
                   withval="$extpike";
23
 
                fi
24
 
                if test -f "$withval" -a  ! -x "$withval" ; then
25
 
                        echo "$withval is not an executable file"
26
 
                        exit 1
27
 
                elif test -x "$withval" -a -f "$withval"; then
28
 
                        DEFPIKE="$withval"
29
 
                else
30
 
                        echo "$withval doesn't exist or isn't an executable file."
31
 
                        exit 1
32
 
                fi
33
 
        fi
34
 
])
35
 
 
36
 
RESULT=no
37
 
AC_MSG_CHECKING(for a working Pike)
38
 
 
39
 
pathpike="`type  pike |sed 's/pike is//' 2>/dev/null`"
40
 
if test "$prefix" != "NONE"; then
41
 
  PREFIXPIKE="$prefix"
42
 
fi
43
 
 
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
46
 
    break;
47
 
  fi
48
 
  a="`dirname ${path}`"
49
 
  a="`dirname ${a}`"
50
 
  AC_MSG_CHECKING(${a})
51
 
  if test -x $path; then
52
 
    PIKE="${path}"
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,'`"
60
 
 
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}"
66
 
            fi
67
 
         done
68
 
         if test -d $PIKE_C_INCLUDE; then
69
 
              PIKE_INCLUDE_DIRS="$PIKE_INCLUDE_DIRS -I$PIKE_INCLUDE_PREFIX"
70
 
              AC_MSG_RESULT(found)
71
 
         else
72
 
              AC_MSG_RESULT(not found)
73
 
         fi
74
 
    fi
75
 
else
76
 
    AC_MSG_RESULT(no)
77
 
fi
78
 
export PIKE_INCLUDE_PREFIX PIKE_INCLUDE_DIRS PIKE PIKE_VERSION
79
 
AC_SUBST(PIKE_INCLUDE_DIRS)
80
 
AC_SUBST(PIKE)
81
 
AC_SUBST(PIKE_VERSION)
82
 
AC_SUBST(PIKE_VERSION_STR)
83
 
AC_SUBST(PIKE_FULL_VERSION)
84
 
done
85
 
if test "x$PIKE" = "x"; then
86
 
    AC_MSG_ERROR(Pike is required for sTeam to run)
87
 
fi
88
 
 
89
 
#brand name
90
 
brand=steam
91
 
AC_ARG_WITH(brand,
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]),
93
 
[
94
 
        echo "$withval ... trying..."
95
 
        brand="$withval"
96
 
])
97
 
AC_SUBST(brand)
98
 
export brand
99
 
 
100
 
#installdir
101
 
installdir=/
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: /.]),
104
 
[
105
 
        echo "$withval ... trying..."
106
 
        installdir="$withval"
107
 
])
108
 
installdir=`echo "$installdir" | sed 's,//*,/,g'`
109
 
AC_SUBST(installdir)
110
 
export installdir
111
 
 
112
 
#configdir
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.]),
116
 
[
117
 
        echo "$withval ... trying..."
118
 
        configdir="$withval"
119
 
])
120
 
configdir=`echo "$configdir" | sed 's,//*,/,g'`
121
 
AC_SUBST(configdir)
122
 
export configdir
123
 
 
124
 
#logdir
125
 
logdir=/var/log/$brand
126
 
AC_ARG_WITH(logdir,
127
 
AC_HELP_STRING([--with-logdir@<:@=logdir@:>@],[Use the specified dir for log files. Default: /var/log/steam.]),
128
 
[
129
 
        echo "$withval ... trying..."
130
 
        logdir="$withval"
131
 
])
132
 
logdir=`echo "$logdir" | sed 's,//*,/,g'`
133
 
AC_SUBST(logdir)
134
 
export logdir
135
 
 
136
 
#steamdir
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).]),
140
 
[
141
 
        echo "$withval ... trying..."
142
 
        steamdir="$withval"
143
 
])
144
 
steamdir=`echo "$steamdir" | sed 's,//*,/,g'`
145
 
AC_SUBST(steamdir)
146
 
export steamdir
147
 
 
148
 
javahome=$JAVA_HOME
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.]),
151
 
[
152
 
        echo "$withval ... trying..."
153
 
        javahome="$withval"
154
 
])
155
 
AC_SUBST(javahome)
156
 
export javahome
157
 
 
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)
160
 
 
161
 
AC_OUTPUT(Makefile)
162
 
 
163
 
chmod +x distrib/redhat/init.d/steam
164
 
chmod +x distrib/suse/init.d/steam
165
 
chmod +x distrib/generic/init.d/steam