… | |
… | |
2 | |
2 | |
3 | AC_INIT([deliantra-server], [3.1], [support@deliantra.net]) |
3 | AC_INIT([deliantra-server], [3.1], [support@deliantra.net]) |
4 | dnl AC_CONFIG_MACRO_DIR([m4]) |
4 | dnl AC_CONFIG_MACRO_DIR([m4]) |
5 | AC_CONFIG_AUX_DIR(utils) |
5 | AC_CONFIG_AUX_DIR(utils) |
6 | AC_CONFIG_SRCDIR([server/cfperl.xs]) |
6 | AC_CONFIG_SRCDIR([server/cfperl.xs]) |
7 | AM_INIT_AUTOMAKE |
7 | AM_INIT_AUTOMAKE([silent-rules subdir-objects foreign no-dist-gzip dist-xz]) |
8 | AM_CONFIG_HEADER(include/autoconf.h) |
8 | AM_CONFIG_HEADER(include/autoconf.h) |
9 | |
9 | |
10 | AM_MAINTAINER_MODE |
10 | AM_MAINTAINER_MODE |
11 | |
11 | |
12 | AC_PREFIX_DEFAULT(/usr/games/deliantra) |
12 | AC_PREFIX_DEFAULT(/usr/games/deliantra) |
… | |
… | |
68 | "Pod::POM 0.27" \ |
68 | "Pod::POM 0.27" \ |
69 | "Safe::Hole 0.10" \ |
69 | "Safe::Hole 0.10" \ |
70 | "Storable 2.0" \ |
70 | "Storable 2.0" \ |
71 | "URI 1.35" \ |
71 | "URI 1.35" \ |
72 | "YAML::XS 0.32" \ |
72 | "YAML::XS 0.32" \ |
|
|
73 | "CBOR::XS 1.5" \ |
73 | ; do |
74 | ; do |
74 | set -- $module_vers |
75 | set -- $module_vers |
75 | module=$1 |
76 | module=$1 |
76 | minvers=$2 |
77 | minvers=$2 |
77 | AC_MSG_CHECKING(for $module perl module version $minvers or higher) |
78 | AC_MSG_CHECKING(for $module perl module version $minvers or higher) |
… | |
… | |
89 | |
90 | |
90 | AC_LANG(C++) |
91 | AC_LANG(C++) |
91 | AC_PROG_CXX |
92 | AC_PROG_CXX |
92 | AC_PROG_CPP |
93 | AC_PROG_CPP |
93 | |
94 | |
94 | AX_CXX_COMPILE_STDCXX_11([noext], [mandatory]) |
95 | AX_CXX_COMPILE_STDCXX(14, [noext], [mandatory]) |
95 | |
96 | |
|
|
97 | AX_CHECK_COMPILE_FLAG(-Wno-unused-result,[CXXFLAGS="$CXXFLAGS -Wno-unused-result"]) |
|
|
98 | AX_CHECK_COMPILE_FLAG(-Wno-narrowing,[CXXFLAGS="$CXXFLAGS -Wno-narrowing"]) |
|
|
99 | |
96 | AC_CHECK_HEADER(tr1/unordered_map,[],[AC_MSG_ERROR([Your compiler must support the Library Technical Report 1 extensions.])]) |
100 | AC_CHECK_HEADER(unordered_map,[],[AC_MSG_ERROR([Your compiler must support C++11 headers.])]) |
97 | |
101 | |
98 | AC_CHECK_HEADER(pthread.h,[],[AC_MSG_ERROR([POSIX thread support is required.])]) |
102 | AC_CHECK_HEADER(pthread.h,[],[AC_MSG_ERROR([POSIX thread support is required.])]) |
99 | |
103 | |
100 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
104 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
101 | |
105 | |
102 | AC_MSG_CHECKING(blitz++ >= 0.9) |
106 | AC_MSG_CHECKING(blitz++ >= 0.10) |
103 | if $PKG_CONFIG blitz --atleast-version 0.9; then |
107 | if $PKG_CONFIG blitz --atleast-version 0.10; then |
104 | CXXFLAGS="$CXXFLAGS `$PKG_CONFIG blitz --cflags`" |
108 | CXXFLAGS="$CXXFLAGS `$PKG_CONFIG blitz --cflags`" |
105 | LIBS="$LIBS `$PKG_CONFIG blitz --libs`" |
109 | LIBS="$LIBS `$PKG_CONFIG blitz --libs`" |
106 | AC_MSG_RESULT(ok) |
110 | AC_MSG_RESULT(ok) |
107 | else |
111 | else |
108 | AC_MSG_ERROR(no) |
112 | AC_MSG_ERROR(no) |
109 | fi |
113 | fi |
110 | |
114 | |
111 | AC_MSG_CHECKING(glib >= 2.10) |
115 | AC_MSG_CHECKING(glib >= 2.32) |
112 | if $PKG_CONFIG glib-2.0 --atleast-version 2.10; then |
116 | if $PKG_CONFIG glib-2.0 --atleast-version 2.10; then |
113 | CXXFLAGS="$CXXFLAGS `$PKG_CONFIG glib-2.0 --cflags`" |
117 | CXXFLAGS="$CXXFLAGS `$PKG_CONFIG glib-2.0 --cflags`" |
114 | LIBS="$LIBS `$PKG_CONFIG glib-2.0 --libs`" |
118 | LIBS="$LIBS `$PKG_CONFIG glib-2.0 --libs`" |
115 | AC_MSG_RESULT(ok) |
119 | AC_MSG_RESULT(ok) |
116 | else |
120 | else |
… | |
… | |
219 | ]) |
223 | ]) |
220 | |
224 | |
221 | AC_SUBST(pkgstatedir,$localstatedir/$PACKAGE) |
225 | AC_SUBST(pkgstatedir,$localstatedir/$PACKAGE) |
222 | AC_SUBST(pkgconfdir,$sysconfdir/$PACKAGE) |
226 | AC_SUBST(pkgconfdir,$sysconfdir/$PACKAGE) |
223 | |
227 | |
224 | AC_OUTPUT([Makefile |
228 | AC_OUTPUT([Makefile lib/Makefile utils/cfutil]) |
225 | include/Makefile lib/Makefile pod/Makefile random_maps/Makefile socket/Makefile |
|
|
226 | server/Makefile utils/Makefile ext/Makefile doc/Makefile |
|
|
227 | common/Makefile utils/cfutil |
|
|
228 | ]) |
|
|
229 | |
229 | |