File: configure.in

package info (click to toggle)
lgeneral 1.1.1-4
  • links: PTS
  • area: contrib
  • in suites: etch, etch-m68k, lenny, sarge
  • size: 2,736 kB
  • ctags: 1,565
  • sloc: ansic: 13,379; makefile: 517; sh: 327
file content (61 lines) | stat: -rw-r--r-- 1,930 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
dnl Process this file with autoconf to produce a configure script.
AC_INIT(Makefile.am)

AM_CONFIG_HEADER(config.h)

AM_INIT_AUTOMAKE(lgeneral,1.1.1)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB

dnl various CFLAGS
CFLAGS="-g"
CFLAGS="$CFLAGS -Wall"

dnl Checks for libraries.
AC_CHECK_LIB(m, main,, AC_MSG_ERROR(maths library is needed))
AC_CHECK_LIB(dl, main,, AC_MSG_ERROR(dl library is needed))

dnl check SDL version
AM_PATH_SDL(1.1.4,, AC_MSG_ERROR(lib SDL >=1.1.4 is needed))
CFLAGS="$CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"

dnl check sound
sound_flag="-DWITH_SOUND"
mixer_flag="-lSDL_mixer"
AC_ARG_ENABLE( sound,
[  --disable-sound         Disables sound], sound_flag=""; mixer_flag="")

dnl check if SDL_mixer's installed
dnl if not: clear sound_flag and mixer_flag
AC_CHECK_LIB(SDL_mixer, main,
AC_MSG_RESULT("SDL_Mixer found"), 
AC_MSG_RESULT("SDL_Mixer NOT found \(get it at http://libsdl.org\): Audio disabled"); sound_flag=""; mixer_flag="")

AC_SUBST(sound_flag)
AC_SUBST(mixer_flag)

dnl check use of dynamic libraries
dl_flag="-DUSE_DL"
export_flag="-Wl,-export-dynamic"
AC_ARG_ENABLE( dl,
[  --disable-dl         Disable use of dynamic AI modules], dl_flag=""; export_flag="")
AC_SUBST(dl_flag)
AC_SUBST(export_flag)

dnl installation path
inst_dir=$datadir/games/lgeneral
inst_flag="-DSRC_DIR=\\\"$inst_dir\\\""

dis_flag=""
AC_ARG_ENABLE( install,
[  --disable-install       No installation. Played from the source directory.], 
inst_dir=. inst_flag="-DSRC_DIR=\\\".\\\"" dis_flag="-DDISABLE_INSTALL")

AC_SUBST(inst_flag)
AC_SUBST(inst_dir)
AC_SUBST(dis_flag)

AC_OUTPUT(Makefile src/Makefile src/nations/Makefile src/scenarios/Makefile src/units/Makefile src/sounds/Makefile src/music/Makefile src/maps/Makefile src/gfx/Makefile  src/gfx/flags/Makefile src/gfx/terrain/Makefile src/gfx/units/Makefile src/ai_modules/Makefile src/campaigns/Makefile src/themes/Makefile src/themes/default/Makefile)