File: configure.in

package info (click to toggle)
circuslinux 1.0.3-28
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,808 kB
  • sloc: ansic: 2,594; sh: 2,317; makefile: 85; perl: 55
file content (103 lines) | stat: -rw-r--r-- 2,043 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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(README.txt)


dnl Setup for automake
AM_INIT_AUTOMAKE(circuslinux,1.0.3)

dnl Detect host info
AC_CANONICAL_HOST
AC_CANONICAL_TARGET


dnl The alpha architecture needs special flags for binary portability
case "$target" in
    alpha*-*-linux*)
        CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
        ;;
esac


dnl Check for tools
AC_PROG_MAKE_SET
AC_PROG_CC
AC_PROG_INSTALL


dnl Use the macro SDL provides to check the installed version of the SDL
dnl development environment.  Abort the configuration process if the
dnl minimum	 version we require isn't available.
SDL_VERSION=1.0.8
AM_PATH_SDL($SDL_VERSION,
             :,
            AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
           )


dnl Add the SDL preprocessor flags and libraries to the build process
CFLAGS="$CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"

AC_SUBST(CFLAGS)
AC_SUBST(LIBS)

dnl Checks for libraries.
dnl Replace `main' with a function in -lSDL_image:
AC_CHECK_LIB(SDL_image, main,
	     LIBS="$LIBS -lSDL_image",
	     AC_MSG_ERROR([*** SDL_image library not found!])	
	    )


dnl Replace `main' with a function in -lSDL_mixer:
use_mixer=yes
AC_CHECK_LIB(SDL_mixer, main,
	     LIBS="$LIBS -lSDL_mixer",
	     use_mixer=no
	    )
if test x$use_mixer = xyes; then
   CFLAGS="$CFLAGS -D__SOUND"
else
   CFLAGS="$CFLAGS -DNOSOUND"		
fi		


dnl Joystick option
JOY=NO
AC_ARG_ENABLE(joystick,
              [  --enable-joystick       Have joystick enabled SDL [default=no]],
              JOY=YES)

AC_SUBST(JOY)

	
dnl shared scorefile
SHARED_SCOREFILE=NO
AC_ARG_ENABLE(scorefile,
              [  --enable-scorefile      Use shared scorefile [default=no]],
              SHARED_SCOREFILE=YES)

AC_SUBST(SHARED_SCOREFILE)


dnl Target
case "$target_os" in
	*linux-gnu | linux* | k*bsd*-gnu | gnu*)
	TARGET_DEF=LINUX
	;;	

 cygwin* | mingw32*)
	TARGET_DEF=WIN32
	;;

 *)
	echo Unidentified $target_os
	;;
esac	
AC_SUBST(TARGET_DEF)


AC_OUTPUT([
	   Makefile
	   data/Makefile
	  ])