Mercurial > otakunoraifu
annotate configure.ac @ 37:f88d47a4bf87
* Modernize configure.ac
* Improve a bit BGM playback
author | thib |
---|---|
date | Tue, 17 Mar 2009 17:47:26 +0000 |
parents | b76a8da75ec3 |
children | 4c832144b3f2 |
rev | line source |
---|---|
0 | 1 dnl >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
2 dnl | |
3 dnl First definition | |
37 | 4 AC_INIT(xclannad, 0.07hb) |
0 | 5 |
6 dnl Software version | |
37 | 7 PACKAGE=$AC_PACKAGE_NAME |
8 VERSION=$AC_PACKAGE_VERSION | |
0 | 9 |
37 | 10 AM_INIT_AUTOMAKE |
0 | 11 |
12 dnl Specify a configuretion file | |
20
824b89018ea8
* CG completion percentage (maybe not working properly?)
thib
parents:
0
diff
changeset
|
13 AC_CONFIG_HEADER(config.h) |
0 | 14 |
15 dnl Checks for programs. | |
16 AC_PROG_CC | |
17 AC_PROG_CXX | |
18 AC_PROG_LN_S | |
19 AC_PROG_RANLIB | |
20 dnl AC_PROG_INSTALL | |
21 AC_PROG_MAKE_SET | |
22 | |
23 dnl dnl On FreeBSD 3.0 (and perhaps some other systems) GNU m4 is | |
24 dnl dnl called `gm4' where `m4' is the system's own m4. | |
25 dnl AC_CHECK_PROGS(M4, gm4 m4, m4) | |
26 dnl | |
27 dnl if test "$M4" = "m4"; then | |
28 dnl AC_MSG_CHECKING(whether m4 is GNU m4) | |
29 dnl if $M4 --version < /dev/null 2>/dev/null | grep '^GNU m4 ' >/dev/null ; then | |
30 dnl AC_MSG_RESULT(yes) | |
31 dnl else | |
32 dnl AC_MSG_RESULT(no) | |
33 dnl if test "$host_vendor" = "sun"; then | |
34 dnl AC_MSG_ERROR("SUN m4 does not work for building Gtk--. Please install GNU m4") | |
35 dnl fi | |
36 dnl fi | |
37 dnl fi | |
38 dnl | |
39 dnl dnl Check that this is GNU m4 - if not, exit with error if this is a SUN | |
40 dnl dnl | |
41 | |
42 dnl Checks for header files. | |
43 AC_HEADER_DIRENT | |
44 AC_HEADER_STDC | |
45 AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h) | |
46 | |
47 dnl Checks for typedefs, structures, and compiler characteristics. | |
48 AC_C_CONST | |
49 AC_TYPE_SIZE_T | |
50 AC_HEADER_TIME | |
51 AC_STRUCT_TM | |
52 #X_LIBS="$X_LIBS -lX11 -lXext -L/usr/X11R6/lib" | |
53 | |
54 | |
55 | |
56 dnl Checks for library functions. | |
57 AC_PROG_GCC_TRADITIONAL | |
58 AC_FUNC_MEMCMP | |
59 AC_FUNC_MMAP | |
60 AC_TYPE_SIGNAL | |
61 AC_CHECK_FUNCS(gettimeofday mkdir snprintf) | |
62 #ac_save_LIBS="$LIBS" | |
63 #LIBS="$LIBS -pthread" | |
64 #AC_CHECK_FUNCS(_thread_sys_sigaltstack) | |
65 #LIBS="$ac_save_LIBS" | |
66 AC_C_BIGENDIAN | |
67 | |
68 dnl for gettext | |
69 dnl ALL_LINGUAS="ja" | |
70 dnl AM_GNU_GETTEXT | |
71 AC_CHECK_FUNC(gettext,,AC_CHECK_LIB(intl, gettext)) | |
72 | |
73 dnl >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | |
74 dnl | |
75 dnl Check libraries | |
76 | |
77 AC_CHECK_LIB(z, zlibVersion) | |
78 AC_CHECK_LIB(png, png_write_end) | |
79 AC_CHECK_LIB(jpeg, jpeg_start_decompress) | |
80 dnl ogg vobis | |
25 | 81 AC_ARG_WITH(vorbis, |
82 AS_HELP_STRING([--disable-vorbis], [Build with vorbis and ogg (default yes)])) | |
26 | 83 if test X$with_vorbis != X"no"; then |
25 | 84 AC_ARG_ENABLE(tremor, AS_HELP_STRING([--enable-tremor], |
85 [enable tremor (integer-only implementation of vorbisfile) (default no)])) | |
86 AC_CHECK_LIB(ogg, ogg_stream_init) | |
87 AC_CHECK_LIB(vorbis, vorbis_book_decode,,,-logg) | |
88 if test X$enable_tremor = X"yes"; then | |
89 AC_CHECK_LIB(vorbisidec, ov_read,,,-logg -lvorbis) | |
90 else | |
91 AC_CHECK_LIB(vorbisfile, ov_read,,,-logg -lvorbis) | |
92 fi | |
0 | 93 fi |
94 | |
95 dnl SDL config | |
96 AM_PATH_SDL() | |
97 AC_SUBST(SDL_CFLAGS) | |
98 AC_SUBST(SDL_LIBS) | |
99 | |
34 | 100 dnl check for sdl_gfx and sdl_mixer |
101 | |
102 AC_CHECK_LIB(SDL_gfx, rotozoomSurfaceXY,, | |
103 AC_MSG_ERROR(This program cannot be build without SDL_gfx)) | |
104 AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio,, | |
105 AC_MSG_ERROR(This program cannot be build without SDL_mixer)) | |
106 | |
0 | 107 dnl SMPEG & MAD config |
108 AM_PATH_SMPEG() | |
109 AC_SUBST(SMPEG_CFLAGS) | |
110 AC_SUBST(SMPEG_LIBS) | |
111 if test X"$SMPEG_LIBS" = X ; then | |
112 USE_SMPEG=0 | |
113 else | |
114 USE_SMPEG=1 | |
115 fi | |
116 AC_ARG_ENABLE(mad, | |
117 [ --disable-mad disable mad (integer-only implementation for mpeg decoding) [ default yes]]) | |
118 if test X$enable_mad != X"no"; then | |
119 AC_CHECK_LIB(mad, mad_decoder_run) | |
120 fi | |
121 | |
122 AC_DEFINE_UNQUOTED(USE_SMPEG,$USE_SMPEG, [smpeg library is used]) | |
123 | |
124 dnl FreeType2 | |
125 AC_CHECK_FT2() | |
126 AC_SUBST(FT2_CFLAGS) | |
127 AC_SUBST(FT2_LIBS) | |
128 | |
129 | |
130 dnl >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | |
131 dnl | |
132 dnl Check option ... Zaurus or embed machines | |
133 USE_X11=1 | |
134 DISPSIZE="no" | |
135 | |
25 | 136 AC_ARG_ENABLE(nwatowav, |
137 AS_HELP_STRING([--enable-nwatowav], [Build the nwatowav utility (default no)])) | |
138 if test X$enable_nwatowav = X"yes"; then | |
139 AC_SUBST(NWATOWAV, ['nwatowav${EXEEXT}']) | |
140 fi | |
141 | |
142 AC_ARG_ENABLE(visarc, | |
143 AS_HELP_STRING([--enable-visarc], [Build the visarc utility (default no)])) | |
144 if test X$enable_visarc = X"yes"; then | |
145 AC_SUBST(VISARC, ['visarc${EXEEXT}']) | |
146 fi | |
147 | |
0 | 148 AC_ARG_ENABLE(zaurus, |
25 | 149 AS_HELP_STRING([--enable-zaurus], [Compile for zaurus environment (default no)])) |
0 | 150 if test X$enable_zaurus = X"yes"; then |
151 USE_X11=0 | |
152 DISPSIZE="320x240" | |
153 fi | |
154 | |
155 AC_ARG_ENABLE(x11, | |
25 | 156 AS_HELP_STRING([--disable-x11], [Use the X11 library (default yes)])) |
0 | 157 if test X$x11 = X"no"; then |
158 USE_X11=0 | |
159 else | |
160 AC_PATH_X | |
161 AC_PATH_XTRA | |
162 X_LIBS="$X_LIBS -lX11 -lXext -L/usr/X11R6/lib" | |
163 LIBS="$LIBS $X_LIBS" | |
164 fi | |
165 | |
166 AC_ARG_ENABLE(displaysize, | |
25 | 167 AS_HELP_STRING([--enable-displaysize=SIZE], |
168 [Change default display size, for example --enable-displaysize=320x240]), | |
0 | 169 displaysize=$enableval) |
170 if test X$displaysize != X; then | |
171 DISPSIZE=$displaysize | |
172 fi | |
173 | |
174 AC_DEFINE_UNQUOTED(USE_X11,$USE_X11, [X11 library is used]) | |
175 AC_DEFINE_UNQUOTED(DISPSIZE, "$DISPSIZE", [default display size]) | |
176 | |
177 AC_OUTPUT(Makefile system/Makefile font/Makefile window/Makefile music2/Makefile scn2k/Makefile) |