ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/configure.ac
(Generate patch)

Comparing deliantra/server/configure.ac (file contents):
Revision 1.57 by root, Tue Mar 6 19:05:14 2007 UTC vs.
Revision 1.60 by root, Sun Mar 11 15:22:18 2007 UTC

8 8
9AM_MAINTAINER_MODE 9AM_MAINTAINER_MODE
10 10
11AC_PREFIX_DEFAULT(/usr/games/crossfire) 11AC_PREFIX_DEFAULT(/usr/games/crossfire)
12 12
13dnl Checks for programs. 13AC_PATH_PROG(GPERF, gperf)
14AC_LANG(C++) 14if test -z "$GPERF"; then
15AC_PROG_CXX 15 AC_MSG_ERROR([gperf, the GNU perfect hash generator, must be in your PATH, check the README])
16AC_PROG_LIBTOOL 16fi
17 17
18AC_PROG_CPP 18AC_PATH_PROG(RSYNC, rsync)
19if test -z "$RSYNC"; then
20 AC_MSG_ERROR([rsync must be in your PATH, check the README])
21fi
22
23AC_PATH_PROG(OPTIPNG, optipng)
24if test -z "$OPTIPNG"; then
25 AC_MSG_ERROR([optipng must be in your PATH, check the README])
26fi
27
28AC_PATH_PROG(IDENTIFY, identify)
29if test -z "$IDENTIFY"; then
30 AC_MSG_ERROR([ImageMagick 'identify' must be in your PATH, check the README])
31fi
19 32
20AC_PATH_PROG(CONVERT, convert) 33AC_PATH_PROG(CONVERT, convert)
21
22if test -z "$CONVERT"; then 34if test -z "$CONVERT"; then
23 AC_MSG_ERROR([ImageMagick 'convert' must be in your PATH, see the README]) 35 AC_MSG_ERROR([ImageMagick 'convert' must be in your PATH, check the README])
24fi 36fi
25 37
26AC_PATH_PROG(PERL, perl5.8) 38AC_PATH_PROG(PERL, perl5.8)
27if test -z "$PERL"; then 39if test -z "$PERL"; then
28 AC_PATH_PROG(PERL, perl5) 40 AC_PATH_PROG(PERL, perl5)
29 if test -z "$PERL"; then 41 if test -z "$PERL"; then
30 AC_PATH_PROG(PERL, perl) 42 AC_PATH_PROG(PERL, perl)
43 if test -z "$PERL"; then
44 AC_MSG_ERROR([perl 5.8 or higher must be in your PATH, check the README])
45 fi
31 fi 46 fi
32fi 47fi
33 48
34for module_vers in "Crossfire 0.97" "Coro 3.5" "Coro::Event 2.1" "Event 1.08" \ 49for module_vers in \
35 "IO::AIO 2.32" "BDB 0.1" "Storable 2.0" "Time::HiRes 1.0" "YAML::Syck 0.71" \ 50 "AnyEvent 2.52" \
36 "Digest::MD5 2.0" "Compress::LZF 1.71" "Safe::Hole 0.10" "Pod::POM 0.17"; do 51 "Image::Size 2.992" \
52 "Crossfire 0.97" \
53 "Coro 3.5" \
54 "Coro::Event 2.1" \
55 "Event 1.08" \
56 "IO::AIO 2.32" \
57 "BDB 0.1" \
58 "Storable 2.0" \
59 "Time::HiRes 1.0" \
60 "YAML::Syck 0.71" \
61 "Digest::MD5 2.0" \
62 "Compress::LZF 1.71" \
63 "Safe::Hole 0.10" \
64 "Pod::POM 0.17" \
65; do
37 set -- $module_vers 66 set -- $module_vers
38 module=$1 67 module=$1
39 minvers=$2 68 minvers=$2
40 AC_MSG_CHECKING(for $module perl module version $minvers or higher) 69 AC_MSG_CHECKING(for $module perl module version $minvers or higher)
41 if $PERL -M$module -e0 >/dev/null 2>&1; then 70 if $PERL -M$module -e0 >/dev/null 2>&1; then
47 fi 76 fi
48 else 77 else
49 AC_MSG_ERROR([no, cannot load module $module]) 78 AC_MSG_ERROR([no, cannot load module $module])
50 fi 79 fi
51done 80done
81
82AC_LANG(C++)
83AC_PROG_CXX
84AC_PROG_CPP
85
86AC_CHECK_HEADER(tr1/unordered_map,[],[AC_MSG_ERROR([Your compiler must support the Library Technical Report 1 extensions.])])
87
88AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
89
90AC_MSG_CHECKING(glib >= 2.10)
91if $PKG_CONFIG glib-2.0 --atleast-version 2.10; then
92 CXXFLAGS="$CXXFLAGS `$PKG_CONFIG glib-2.0 --cflags`"
93 LIBS="$LIBS `$PKG_CONFIG glib-2.0 --libs`"
94 AC_MSG_RESULT(ok)
95else
96 AC_MSG_ERROR(no)
97fi
98
99AC_MSG_CHECKING(libpng)
100if $PKG_CONFIG libpng --exists; then
101 CXXFLAGS="$CXXFLAGS `$PKG_CONFIG libpng --cflags`"
102 LIBS="$LIBS `$PKG_CONFIG libpng --libs`"
103 AC_MSG_RESULT(ok)
104else
105 AC_MSG_ERROR(no)
106fi
107
108AC_PROG_LIBTOOL
52 109
53AC_MSG_CHECKING(for $PERL suitability) 110AC_MSG_CHECKING(for $PERL suitability)
54if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>&1; then 111if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>&1; then
55 save_CXXFLAGS="$CXXFLAGS" 112 save_CXXFLAGS="$CXXFLAGS"
56 save_LIBS="$LIBS" 113 save_LIBS="$LIBS"
90 147
91dnl check for some other programs 148dnl check for some other programs
92AC_PATH_PROG(TAR, tar) 149AC_PATH_PROG(TAR, tar)
93AC_PATH_PROG(BASENAME, basename) 150AC_PATH_PROG(BASENAME, basename)
94 151
95AC_PATH_PROG(GPERF, gperf)
96if test -z "$GPERF"; then
97 AC_MSG_ERROR([we need gperf, the GNU perfect hash generator])
98fi
99
100AC_CHECK_LIB(nsl, main) 152AC_CHECK_LIB(nsl, main)
101AC_CHECK_LIB(socket, main) 153AC_CHECK_LIB(socket, main)
102 154
103dnl Checks for libraries. 155dnl Checks for libraries.
104AC_CHECK_LIB(m, main) 156AC_CHECK_LIB(m, main)
105 157
106AC_CHECK_HEADER(tr1/unordered_map,[],[AC_MSG_ERROR([Your compiler must support the Library Technical Report 1 extensions.])])
107
108AC_CHECK_SIZEOF(long) 158AC_CHECK_SIZEOF(long)
109AC_CHECK_SIZEOF(long long) 159AC_CHECK_SIZEOF(long long)
110
111AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
112
113AC_MSG_CHECKING(glib >= 2.10)
114if $PKG_CONFIG glib-2.0 --atleast-version 2.10; then
115 CXXFLAGS="$CXXFLAGS `$PKG_CONFIG glib-2.0 --cflags`"
116 LIBS="$LIBS `$PKG_CONFIG glib-2.0 --libs`"
117 AC_MSG_RESULT(ok)
118else
119 AC_MSG_ERROR(no)
120fi
121
122AC_MSG_CHECKING(libpng)
123if $PKG_CONFIG libpng --exists; then
124 CXXFLAGS="$CXXFLAGS `$PKG_CONFIG libpng --cflags`"
125 LIBS="$LIBS `$PKG_CONFIG libpng --libs`"
126 AC_MSG_RESULT(ok)
127else
128 AC_MSG_ERROR(no)
129fi
130 160
131AC_SUBST(pkgstatedir,$localstatedir/$PACKAGE) 161AC_SUBST(pkgstatedir,$localstatedir/$PACKAGE)
132AC_SUBST(pkgconfdir,$sysconfdir/$PACKAGE) 162AC_SUBST(pkgconfdir,$sysconfdir/$PACKAGE)
133 163
134AC_OUTPUT([Makefile 164AC_OUTPUT([Makefile
135 include/Makefile lib/Makefile pod/Makefile random_maps/Makefile socket/Makefile 165 include/Makefile lib/Makefile pod/Makefile random_maps/Makefile socket/Makefile
136 server/Makefile utils/Makefile ext/Makefile doc/Makefile 166 server/Makefile utils/Makefile ext/Makefile doc/Makefile
137 lib/checkarch.pl lib/collect.pl common/Makefile 167 lib/checkarch.pl lib/collect.pl common/Makefile utils/cfutil
138]) 168])
139 169

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines