Debian Codegraph @

configure.ac

raw ◀ ▶
Source reconstructed at patch state 0 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ([2.71])
5 AC_INIT([lbreakouthd],[1.2.3])
6 AC_CONFIG_SRCDIR([src/main.cpp])
7 AC_CONFIG_HEADERS([config.h])
8 AM_INIT_AUTOMAKE
9
10 AC_USE_SYSTEM_EXTENSIONS
11 AM_GNU_GETTEXT([external])
12
13 # Checks for programs.
14 AC_PROG_CXX
15 AC_PROG_CC
16 AC_PROG_RANLIB
17
18 # Checks for libraries.
19 AC_CHECK_LIB(m, main,, AC_MSG_ERROR(lib math is needed))
20 AC_CHECK_LIB(SDL2, main,, AC_MSG_ERROR(lib SDL2 is needed))
21 AC_CHECK_LIB(SDL2_ttf, main,, AC_MSG_ERROR(lib SDL2 ttf is needed))
22 AC_CHECK_LIB(SDL2_image, main,, AC_MSG_ERROR(lib SDL2 image is needed))
23 AC_CHECK_LIB(SDL2_mixer, main,, AC_MSG_ERROR(lib SDL2 mixer is needed))
24
25 # Checks for header files.
26 AC_CHECK_HEADERS([stdlib.h string.h])
27
28 # Checks for typedefs, structures, and compiler characteristics.
29 AC_CHECK_HEADER_STDBOOL
30 AC_C_INLINE
31
32 # Checks for library functions.
33 AC_FUNC_ALLOCA
34 AC_FUNC_MALLOC
35 AC_FUNC_REALLOC
36 AC_FUNC_STRTOD
37 AC_CHECK_FUNCS([memset strchr strdup strrchr])
38
39 dnl allow changing config dir
40 configdir=.lbreakouthd
41 AC_ARG_WITH( configdir,
42 [ --with-configdir=CONFIGDIR Set directory for config/data files in home directory (default: .lbreakouthd).],
43 configdir="$withval",)
44
45 # other flags
46 datdir=$datadir/$PACKAGE
47 hiscoredir=$localstatedir
48 debugflags=""
49 AC_ARG_ENABLE( install,
50 [ --disable-install No installation. Start from source directory.],
51 datdir="." hiscoredir="." configdir=".")
52 AC_ARG_ENABLE( debug,
53 [ --enable-debug Add debug symbols, no optimization.],
54 debugflags="-O0 -g -DWITH_BUG_REPORT")
55 AC_SUBST(datdir)
56 AC_SUBST(hiscoredir)
57
58 CFLAGS="$CFLAGS -Wno-int-conversion -Wno-format -Wno-implicit-function-declaration"
59 CFLAGS="$CFLAGS $debugflags -DSRC_DIR=\\\"$datdir\\\" -DCONFIG_DIR_NAME=\\\"$configdir\\\""
60 CXXFLAGS="$CXXFLAGS -std=c++11 -Wall $debugflags -DLOCALEDIR=\\\"$localedir\\\" -DCONFIGDIR=\\\"$configdir\\\" -DDATADIR=\\\"$datdir\\\" -DHISCOREDIR=\\\"$hiscoredir\\\""
61
62 if test "x$host" = "xx86_64-w64-mingw32"; then
63 CFLAGS="$CFLAGS -DWIN32 -I/usr/$host/sys-root/mingw/include"
64 CXXFLAGS="$CXXFLAGS -DWIN32 -I/usr/$host/sys-root/mingw/include"
65 CXXFLAGS="$CXXFLAGS $(/usr/$host/sys-root/mingw/bin/sdl2-config --cflags)"
66 # we can't use sdl2-config as we want to skip -mwindows as it
67 # does funny things (not like a clown tho) also -lintl is needed
68 LIBS="$LIBS -lintl -L/usr/$host/sys-root/mingw/lib -lmingw32 -lSDL2main -lSDL2"
69 else
70 CXXFLAGS="$CXXFLAGS $(sdl2-config --cflags)"
71 LIBS="$LIBS $LIBINTL $(sdl2-config --libs)"
72 fi
73
74 # Makefiles
75 AC_CONFIG_FILES([Makefile
76 po/Makefile.in
77 libgame/Makefile
78 src/Makefile
79 src/levels/Makefile
80 src/themes/Makefile
81 src/themes/Standard/Makefile
82 src/themes/Classic/Makefile
83 ])
84 AC_OUTPUT
85