File: configure.ac

package info (click to toggle)
amoebax 0.2.1%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, trixie
  • size: 12,976 kB
  • sloc: cpp: 14,521; sh: 3,739; makefile: 450; objc: 157; ansic: 99
file content (117 lines) | stat: -rw-r--r-- 3,531 bytes parent folder | download | duplicates (7)
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Process this file with autoconf to produce a configure script.
AC_INIT([Amoebax], [0.2.1], [jordi@emma-soft.com])
AC_COPYRIGHT([Copyright (c) 2006, 2007 Emma's Software.])
AM_INIT_AUTOMAKE([dist-bzip2])
AM_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE

# Check host.
AC_CANONICAL_HOST
case "${host}" in
    *-apple-darwin*)
        AC_DEFINE([IS_OSX_HOST], [1], [Set to 1 if you are compiling on an OS X host.])
        osx_host="yes"
        ;;
    *-gp2x*)
        AC_DEFINE([IS_GP2X_HOST], [1], [Set to 1 if you are compiling on a GP2X host.])
        gp2x_host="yes"
        ;;
    arm-*-mingw32*)
        AC_DEFINE([IS_WINCE_HOST], [1], [Set to 1 if you are compiling on a Windows CE host.])
        wince_host="yes"
        ;;
    *-*-mingw32* | *-*-cygwin*)
        AC_DEFINE([IS_WIN32_HOST], [1], [Set to 1 if you are compiling on a Windows host.])
        win32_host="yes"
        ;;
esac
AM_CONDITIONAL([IS_OSX_HOST], [test "x${osx_host}" = "xyes"])
AM_CONDITIONAL([IS_GP2X_HOST], [test "x${gp2x_host}" = "xyes"])
AM_CONDITIONAL([IS_WIN32_HOST], [test "x${win32_host}" = "xyes"])
AM_CONDITIONAL([IS_WINCE_HOST], [test "x${wince_host}" = "xyes"])

# Parameters
AC_ARG_ENABLE([debug],
              AS_HELP_STRING([--enable-debug],
                             [turn on debugging (default is NO)]))
if test "x$enable_debug" != "xyes"; then
    DEBUGFLAGS="-DNDEBUG"
else
    DEBUGFLAGS="-DDEBUG"
fi

# Check for programs.
AC_PROG_MAKE_SET
AC_PROG_CXX
AC_LANG([C++])
# Support for Objective-C in OS X.
AC_PROG_OBJC
AC_SUBST([OBJC])
AC_SUBST([OBJCFLAGS])
_AM_DEPENDENCIES([OBJC])
# Support for resource files in Windows.
AC_CHECK_TOOL([WINDRES], [windres], [no])
AM_CONDITIONAL([build_win32_resource], [test "x$WINDRES" != "xno"])
# Check for WiX files in order to create Windows installer script.
AC_PATH_PROG([CANDLE], [candle], [no])
AC_PATH_PROG([LIGHT], [light], [no])
AM_CONDITIONAL([build_win32_msi], [test "x$CANDLE" != "xno" -a "x$LIGHT" != "xno"])
# Support for documentation.
AC_PATH_PROG([DOXYGEN], [doxygen], [no])
AM_CONDITIONAL(build_reference, [test "x$DOXYGEN" != "xno"])

# Check for header files.
# Check for libraries.
AM_BINRELOC
ES_LIB_SDL([1.2.7], [amoebax_sdl_found="yes"])
if test "x${amoebax_sdl_found}" != "xyes" ; then
    AC_MSG_ERROR([SDL library not found.])
fi
ES_LIB_SDL_SUBLIB([image], [IMAGE], [amoebax_sdl_image_found="yes"])
if test "x${amoebax_sdl_image_found}" != "xyes" ; then
    AC_MSG_ERROR([SDL_image library not found.])
fi
ES_LIB_SDL_SUBLIB([mixer], [MIXER], [amoebax_sdl_mixer_found="yes"])
if test "x${amoebax_sdl_mixer_found}" != "xyes" ; then
    AC_MSG_ERROR([SDL_mixer library not found.])
fi

AC_SUBST([SDL_IMAGE_CFLAGS])
AC_SUBST([SDL_IMAGE_LIBS])
AC_SUBST([SDL_MIXER_CFLAGS])
AC_SUBST([SDL_MIXER_LIBS])

# Check for types.
# Check for structures.
# Check for compiler characteristics.
# Check for libraries functions.
# Check for system services.

# Set the CFLAGS and CXXFLAGS
CFLAGS="$CFLAGS $DEBUGFLAGS"
CXXFLAGS="$CXXFLAGS $DEBUGFLAGS"

# Set the right extension for GP2X executable files.
if test "x${gp2x_host}" = "xyes"; then
    EXEEXT=".gpe"
fi

AC_CONFIG_FILES([   \
Makefile    \
autopackage/Makefile    \
autopackage/default.apspec  \
data/Makefile   \
data/InfoPlist.strings \
data/Info.plist \
data/AmoebaxMain.nib/Makefile   \
data/dlls/Makefile   \
data/fonts/Makefile   \
data/graphics/Makefile   \
data/graphics/gp2x/Makefile   \
data/music/Makefile   \
data/sfx/Makefile   \
doc/Doxyfile    \
doc/Makefile    \
m4/Makefile \
src/Makefile])
AC_OUTPUT