root/configure.ac

Revision 67:419761c8d9b9, 4.5 KB (checked in by Emmanuel Gil Peyrot <linkmauve@…>, 12 months ago)
Add configure option to build scn2kdump.
Line 
1dnl >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2dnl
3dnl First definition
4AC_INIT(otakunoraifu, 0.1)
5
6dnl Software version
7PACKAGE=$AC_PACKAGE_NAME
8VERSION=$AC_PACKAGE_VERSION
9
10AM_INIT_AUTOMAKE
11
12dnl Specify a configuretion file
13AC_CONFIG_HEADER(config.h)
14
15dnl Checks for programs.
16AC_PROG_CC
17AC_PROG_CXX
18AC_PROG_LN_S
19AC_PROG_RANLIB
20dnl AC_PROG_INSTALL
21AC_PROG_MAKE_SET
22
23dnl dnl On FreeBSD 3.0 (and perhaps some other systems) GNU m4 is
24dnl dnl called `gm4' where `m4' is the system's own m4.
25dnl AC_CHECK_PROGS(M4, gm4 m4, m4)
26dnl
27dnl if test "$M4" = "m4"; then
28dnl   AC_MSG_CHECKING(whether m4 is GNU m4)
29dnl   if $M4 --version < /dev/null 2>/dev/null | grep '^GNU m4 ' >/dev/null ; then
30dnl       AC_MSG_RESULT(yes)
31dnl   else
32dnl       AC_MSG_RESULT(no)
33dnl       if test "$host_vendor" = "sun"; then
34dnl               AC_MSG_ERROR("SUN m4 does not work for building Gtk--. Please install GNU m4")
35dnl       fi
36dnl   fi
37dnl fi
38dnl
39dnl dnl Check that this is GNU m4 - if not, exit with error if this is a SUN
40dnl dnl
41
42dnl Checks for header files.
43AC_HEADER_DIRENT
44AC_HEADER_STDC
45AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h)
46
47dnl Checks for typedefs, structures, and compiler characteristics.
48AC_C_CONST
49AC_TYPE_SIZE_T
50AC_HEADER_TIME
51AC_STRUCT_TM
52#X_LIBS="$X_LIBS -lX11 -lXext -L/usr/X11R6/lib"
53
54
55
56dnl Checks for library functions.
57AC_PROG_GCC_TRADITIONAL
58AC_FUNC_MEMCMP
59AC_FUNC_MMAP
60AC_TYPE_SIGNAL
61AC_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"
66AC_C_BIGENDIAN
67
68dnl for gettext
69dnl ALL_LINGUAS="ja"
70dnl AM_GNU_GETTEXT
71AC_CHECK_FUNC(gettext,,AC_CHECK_LIB(intl, gettext))
72
73dnl >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
74dnl
75dnl Check libraries
76
77AC_CHECK_LIB(z, zlibVersion)
78AC_CHECK_LIB(png, png_write_end)
79AC_CHECK_LIB(jpeg, jpeg_start_decompress)
80dnl ogg vobis
81AC_ARG_ENABLE(vorbis,
82        AS_HELP_STRING([--disable-vorbis], [Build with vorbis and ogg (default yes)]))
83if test X$enable_vorbis != X"no"; then
84    AC_ARG_WITH(tremor, AS_HELP_STRING([--with-tremor],
85        [use the tremor (integer-only implementation of vorbisfile) library (default no)]))
86    AC_CHECK_LIB(ogg, ogg_stream_init)
87    AC_CHECK_LIB(vorbis,  vorbis_book_decode,,,-logg)
88    if test X$with_tremor = X"yes"; then
89        AC_CHECK_LIB(vorbisidec,  ov_read,,
90                                 AC_MSG_ERROR(vorbisidec (tremor) not found),-logg -lvorbis)
91    else
92        AC_CHECK_LIB(vorbisfile,  ov_read,,
93                                 AC_MSG_ERROR(vorbisfile not found),-logg -lvorbis)
94    fi
95fi
96
97dnl SDL config
98AM_PATH_SDL()
99AC_SUBST(SDL_CFLAGS)
100AC_SUBST(SDL_LIBS)
101
102dnl check for sdl_gfx and sdl_mixer
103
104AC_CHECK_LIB(SDL_gfx, rotozoomSurfaceXY,,
105        AC_MSG_ERROR(This program cannot be build without SDL_gfx))
106AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio,,
107        AC_MSG_ERROR(This program cannot be build without SDL_mixer))
108
109dnl SMPEG & MAD config
110AM_PATH_SMPEG()
111AC_SUBST(SMPEG_CFLAGS)
112AC_SUBST(SMPEG_LIBS)
113if test X"$SMPEG_LIBS" = X ; then
114        USE_SMPEG=0
115else
116        USE_SMPEG=1
117fi
118AC_ARG_WITH(mad,
119        [ --without-mad         use mad (integer-only implementation for mpeg decoding) [ default yes]])
120if test X$without_mad != X"no"; then
121        AC_CHECK_LIB(mad, mad_decoder_run)
122fi
123
124AC_DEFINE_UNQUOTED(USE_SMPEG,$USE_SMPEG, [smpeg library is used])
125
126dnl FreeType2
127AC_CHECK_FT2()
128AC_SUBST(FT2_CFLAGS)
129AC_SUBST(FT2_LIBS)
130
131
132dnl >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
133dnl
134dnl Check option ... Zaurus or embed machines
135USE_X11=1
136
137AC_ARG_ENABLE(nwatowav,
138    AS_HELP_STRING([--enable-nwatowav], [Build the nwatowav utility (default no)]))
139if test X$enable_nwatowav = X"yes"; then
140    AC_SUBST(NWATOWAV, ['nwatowav${EXEEXT}'])
141fi
142
143AC_ARG_ENABLE(scn2kdump,
144    AS_HELP_STRING([--enable-scn2kdump], [Build the scn2kdump utility (default no)]))
145if test X$enable_scn2kdump = X"yes"; then
146    AC_SUBST(SCN2KDUMP, ['scn2kdump${EXEEXT}'])
147fi
148
149AC_ARG_ENABLE(visarc,
150    AS_HELP_STRING([--enable-visarc], [Build the visarc utility (default no)]))
151if test X$enable_visarc = X"yes"; then
152    AC_SUBST(VISARC, ['visarc${EXEEXT}'])
153fi
154
155AC_ARG_ENABLE(zaurus,
156    AS_HELP_STRING([--enable-zaurus], [Compile for zaurus environment (default no)]))
157if test X$enable_zaurus = X"yes"; then
158        USE_X11=0
159fi
160
161AC_ARG_WITH(x11,
162    AS_HELP_STRING([--without-x11], [Use the X11 library (default yes)]))
163if test X$with_x11 = X"no"; then
164        USE_X11=0
165else
166        AC_PATH_X
167        AC_PATH_XTRA
168        X_LIBS="$X_LIBS -lX11 -lXext"
169        LIBS="$LIBS $X_LIBS"
170fi
171
172AC_DEFINE_UNQUOTED(USE_X11,$USE_X11, [X11 library is used])
173
174AC_OUTPUT(Makefile system/Makefile font/Makefile window/Makefile music2/Makefile scn2k/Makefile)
Note: See TracBrowser for help on using the browser.