File: configure.in

package info (click to toggle)
epiphany 0.7.0+0-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 7,528 kB
  • ctags: 1,027
  • sloc: cpp: 6,404; ansic: 141; makefile: 78; sh: 7
file content (74 lines) | stat: -rw-r--r-- 2,221 bytes parent folder | download | duplicates (3)
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
AC_INIT()
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(epiphany,0.7.0)
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_CHECK_HEADER(SDL/SDL.h,, [echo "Please install SDL from http://www.libsdl.org";exit])
AC_CHECK_HEADER(SDL/SDL_mixer.h,, [echo "Please install SDL_mixer from http://www.libsdl.org/projects/SDL_mixer/";exit])
AC_LANG_PUSH(C++)
AC_CHECK_HEADER(tinyxml.h,, [echo "Please install tinyxml library from http://www.grinninglizard.com/tinyxml/";exit])


AC_CHECK_LIB( SDL,   main,, [
        echo "SDL installed, but -lSDL not found, run 'ldconfig' and try again,"
        echo "if that doesn't help have a look at the file config.log and look into"
        echo "the FAQ."
        exit
        ])
 
 AC_CHECK_LIB( SDL_mixer,   main,, [
        echo "SDL_mixer installed, but -lSDL_mixer not found, run 'ldconfig' and try again,"
        echo "if that doesn't help have a look at the file config.log and look into"
        echo "the FAQ."
        exit
        ])

AC_CHECK_LIB( tinyxml,   main,, [
        echo "tinyxml installed, but -ltinyxml not found, run 'ldconfig' and try again,"
        echo "if that doesn't help have a look at the file config.log and look into"
        echo "the FAQ."
        exit
        ])


AH_TEMPLATE(DEBUG_MODE)
[CXXFLAGS=""]



AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],[Enable debug mode]), [
	AC_DEFINE(DEBUG_MODE,1)
	CXXFLAGS="$CXXFLAGS -O0 -g -Wall -pedantic"
	CPPFLAGS="$CPPFLAGS -DRESOURCE_PATH=\"\\\"${datadir}/${PACKAGE}\\\"\""
	],
    [
    CXXFLAGS="$CXXFLAGS -O2"
   CPPFLAGS="$CPPFLAGS -DRESOURCE_PATH=\"\\\"${datadir}/${PACKAGE}\\\"\""
    ]
	)

AC_ARG_ENABLE(profile, AC_HELP_STRING([--enable-profile],[Enable profile mode (very slow!)]), [
	CXXFLAGS="$CXXFLAGS -pg"
	],)

AC_ARG_ENABLE(static, AC_HELP_STRING([--enable-static],[Enable static compiling]), [
	LDFLAGS="$LDFLAGS --static"
	LIBS="$LIBS -L/usr/X11R6/lib -lXext -lXxf86vm -lX11 -lXm -lz -lSDL -lSDL_mixer -ldl -lpthread"
	],)
	
AC_OUTPUT(	Makefile		\
		src/Makefile		\
		data/Makefile		\
		data/gfx/Makefile	\
		data/sfx/Makefile	\
		data/maps/Makefile
		)
echo ""
echo " LDFLAGS = $LDFLAGS"
echo " CXXFLAGS = $CXXFLAGS"
echo ""
echo "Epiphany configuration is done. Start 'make' now."
echo ""