1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.13)
5AC_INIT([toppler],[1.1.6])
6AC_CANONICAL_HOST
7AC_CANONICAL_TARGET
8AM_INIT_AUTOMAKE
9AC_CONFIG_SRCDIR([toppler.cc])
10AM_CONFIG_HEADER([config.h])
11AM_MAINTAINER_MODE
12
13# General information.
14AC_SUBST(FULLNAME,"Tower Toppler")
15AC_SUBST(URL,"http://toppler.sourceforge.net/")
16AC_DEFINE_UNQUOTED([FULLNAME],["$FULLNAME"],[Define to the full name of this package.])
17AC_DEFINE_UNQUOTED([URL],["$URL"],[Define to the URL of this package's homepage.])
18
19# Compiler options.
20
21# Additional variables.
22
23# I18n.
24AM_GNU_GETTEXT([external])
25AM_GNU_GETTEXT_VERSION(0.11.5)
26LIBS="$LIBS $LIBINTL"
27
28# Checks for programs.
29AC_PROG_CXX
30AC_PROG_CC
31AC_PROG_LIBTOOL
32
33# Checks for libraries.
34SDL_VERSION=1.2.0
35AM_PATH_SDL($SDL_VERSION,
36	AC_DEFINE_UNQUOTED(HAVE_SDL,[1],[Define to 1 if you have SDL.]),
37	AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]))
38CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
39LIBS="$LIBS $SDL_LIBS"
40
41AC_CHECK_LIB(SDL_mixer, main, ,
42	AC_MSG_WARN([Can't find SDL_mixer. Toppler will have no sound.]))
43
44AC_CHECK_LIB(z, uncompress, ,
45	AC_MSG_ERROR([Can't find libz. Toppler needs it to uncompress the data file!]))
46
47# Checks for header files.
48AC_HEADER_DIRENT
49AC_HEADER_STDC
50AC_CHECK_HEADERS([fcntl.h langinfo.h libintl.h stdlib.h string.h unistd.h wchar.h sys/types.h dirent.h])
51
52# Checks for typedefs, structures, and compiler characteristics.
53AC_HEADER_STDBOOL
54AC_C_CONST
55AC_TYPE_UID_T
56AC_TYPE_SIZE_T
57
58# Checks for library functions.
59AC_FUNC_CLOSEDIR_VOID
60AC_FUNC_VPRINTF
61AC_CHECK_FUNCS([atexit malloc realloc memmove memset mkdir setlocale strcasecmp strchr strstr])
62
63# Output.
64AC_CONFIG_FILES([Makefile toppler.spec toppler.nsi toppler.desktop po/Makefile.in m4/Makefile toppler.qpg])
65AC_OUTPUT
66