File: configure.in

package info (click to toggle)
lmarbles 1.0.8-0.2
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 2,580 kB
  • sloc: ansic: 5,511; sh: 3,029; makefile: 178
file content (89 lines) | stat: -rw-r--r-- 2,131 bytes parent folder | download
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
dnl Process this file with autoconf to produce a configure script.
AC_INIT(Makefile.am)

AC_CANONICAL_TARGET
AC_USE_SYSTEM_EXTENSIONS

AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(lmarbles,1.0.8)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
AC_EXEEXT
AC_CANONICAL_HOST

dnl check for libraries
AC_CHECK_LIB(m, main,, AC_MSG_ERROR(lib math is needed))

dnl check SDL version
AM_PATH_SDL(1.0.0,, AC_MSG_ERROR(lib SDL is needed))
CFLAGS="$CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
AM_PATH_SDL(1.1.5, CFLAGS="$CFLAGS -DSDL_1_1_5",)

dnl check sound
sound_flag="-DSOUND"
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: Audio disabled"); sound_flag=""; mixer_flag="")

AC_SUBST(sound_flag)
AC_SUBST(mixer_flag)

dnl check ascii-flag
ascii_flag=""
AC_ARG_ENABLE( ascii,
[  --enable-ascii          Enables 'save as ascii' option (for big-endian)], ascii_flag="-DASCII")
AC_SUBST(ascii_flag)

dnl installation & prefix path
inst_dir="$datadir/lmarbles"
prf_dir=$localstatedir

dnl check if installation was disabled
AC_ARG_ENABLE( install,
[  --disable-install       No installation. Played from the source directory.], 
inst_dir="." prf_dir=".")

inst_flag="-DSRC_DIR=\\\"$inst_dir\\\""
prf_flag="-DPRF_DIR=\\\"$prf_dir\\\""

AC_SUBST(inst_flag)
AC_SUBST(prf_flag)
AC_SUBST(inst_dir)
AC_SUBST(prf_dir)

case "$host" in
        *-mingw32)
                win32="yes"
                win32_inst_script="`pwd -W`/installer.iss"
                arch_flag="-march=i586"
                win32_deps="lmarblesres.o" ;;
        *)
                win32="no"
                win32_inst_script=""
                arch_flag=""
                win32_deps="" ;;
esac

AC_SUBST(win32_deps)
AC_SUBST(arch_flag)

if test "x$win32" = xyes; then
	AC_PROG_AWK
dnl	AC_PROG_STRIP
dnl	AC_PROG_ISCC
	AC_SUBST(win32_inst_script)
fi

appname="LMarbles"
AC_SUBST(appname)

AC_OUTPUT(Makefile src/Makefile)