File: configure.in

package info (click to toggle)
gtkboard 0.11pre0-12
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,972 kB
  • ctags: 2,958
  • sloc: ansic: 20,200; sh: 3,434; makefile: 95
file content (105 lines) | stat: -rw-r--r-- 2,096 bytes parent folder | download | duplicates (4)
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

AC_INIT(src/)

AC_CANONICAL_HOST
AC_CANONICAL_TARGET

AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gtkboard,0.11pre0)
AC_PROG_CC

AC_ARG_ENABLE(gtk2,
		[  --disable-gtk2      Don't look for GTK2 libraries],
		enable_gtk2=$enableval,
		enable_gtk2="yes")

found_gtk2=0;

if test "$enable_gtk2" = "yes" ; then
	dnl check if user has gtk2
	PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.0.0, found_gtk2=1, found_gtk2=0)
fi

if test $found_gtk2 = 0; then
	AM_PATH_GTK(1.2.3, , AC_MSG_ERROR(gtkboard needs GTK 1.2.3 or higher))
fi


AC_ARG_ENABLE(sdl,
        [  --disable-sdl      Don't look for the SDL library],
        enable_sdl=$enableval,
        enable_sdl="yes")

if test "$enable_sdl" = "yes" ; then
	dnl Check for SDL
	SDL_VERSION=1.2.0
	AM_PATH_SDL($SDL_VERSION,
			AC_DEFINE([HAVE_SDL], [], [Do we have the SDL library]), 
			AC_MSG_WARN([*** SDL version $SDL_VERSION not found. Sound will be disabled])
	)
	CFLAGS="$CFLAGS $SDL_CFLAGS"
	LIBS="$LIBS $SDL_LIBS -lSDL_mixer"
fi

gnome=false

GNOME_CFLAGS=""
GNOME_LIBS=""

AC_ARG_ENABLE(gnome,[  --enable-gnome    Turn on gnome ],[
	if test "x$enableval" = "xyes"; then
		gnome=true
	fi
])

if test "$gnome" = true ; then
	PKG_CHECK_MODULES(GNOME, [
			libgnome-2.0 >= 2.0.0
			libgnomeui-2.0 >= 2.0.0
	])
	GNOME_CFLAGS="$GNOME_CFLAGS -DHAVE_GNOME=1"
fi

AC_SUBST(GNOME_CFLAGS)
AC_SUBST(GNOME_LIBS)
	
AM_CONDITIONAL(WITH_GNOME, test "x$gnome" = "xtrue")

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

dnl Checks for library functions.
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(mkdir strtol)

AC_OUTPUT([
		Makefile
		doc/Makefile
		src/Makefile
		sounds/Makefile
		pixmaps/Makefile
		])

echo " "

if test "$enable_gtk2" = "yes" ; then
	AC_MSG_RESULT([    GTK2 enabled.])
else
	AC_MSG_RESULT([    GTK2 disabled.])
fi

if test "$enable_sdl" = "yes" ; then
	AC_MSG_RESULT([     SDL enabled.])
else
	AC_MSG_RESULT([     SDL disabled.])
fi
if test "$enable_gnome" = "yes" ; then
	AC_MSG_RESULT([   GNOME enabled.])
else
	AC_MSG_RESULT([   GNOME disabled.])
fi