annotate configure.in @ 18:4d7486cb20a9

Sync with upstream
author thib
date Tue, 16 Sep 2008 15:30:03 +0000
parents 223b71206888
children 824b89018ea8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
223b71206888 Initial import
thib
parents:
diff changeset
1 dnl >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
223b71206888 Initial import
thib
parents:
diff changeset
2 dnl
223b71206888 Initial import
thib
parents:
diff changeset
3 dnl First definition
223b71206888 Initial import
thib
parents:
diff changeset
4 AC_INIT(scn2k)
223b71206888 Initial import
thib
parents:
diff changeset
5
223b71206888 Initial import
thib
parents:
diff changeset
6 dnl Software version
223b71206888 Initial import
thib
parents:
diff changeset
7 PACKAGE=xclannad
223b71206888 Initial import
thib
parents:
diff changeset
8 VERSION=scn2k
223b71206888 Initial import
thib
parents:
diff changeset
9
223b71206888 Initial import
thib
parents:
diff changeset
10 dnl I do not use automake ; It is too difficult for me ...
223b71206888 Initial import
thib
parents:
diff changeset
11 dnl AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
223b71206888 Initial import
thib
parents:
diff changeset
12
223b71206888 Initial import
thib
parents:
diff changeset
13 dnl Specify a configuretion file
223b71206888 Initial import
thib
parents:
diff changeset
14 AM_CONFIG_HEADER(config.h)
223b71206888 Initial import
thib
parents:
diff changeset
15
223b71206888 Initial import
thib
parents:
diff changeset
16 dnl Checks for programs.
223b71206888 Initial import
thib
parents:
diff changeset
17 AC_PROG_CC
223b71206888 Initial import
thib
parents:
diff changeset
18 AC_PROG_CXX
223b71206888 Initial import
thib
parents:
diff changeset
19 AC_PROG_LN_S
223b71206888 Initial import
thib
parents:
diff changeset
20 AC_PROG_RANLIB
223b71206888 Initial import
thib
parents:
diff changeset
21 dnl AC_PROG_INSTALL
223b71206888 Initial import
thib
parents:
diff changeset
22 AC_PROG_MAKE_SET
223b71206888 Initial import
thib
parents:
diff changeset
23
223b71206888 Initial import
thib
parents:
diff changeset
24 dnl dnl On FreeBSD 3.0 (and perhaps some other systems) GNU m4 is
223b71206888 Initial import
thib
parents:
diff changeset
25 dnl dnl called `gm4' where `m4' is the system's own m4.
223b71206888 Initial import
thib
parents:
diff changeset
26 dnl AC_CHECK_PROGS(M4, gm4 m4, m4)
223b71206888 Initial import
thib
parents:
diff changeset
27 dnl
223b71206888 Initial import
thib
parents:
diff changeset
28 dnl if test "$M4" = "m4"; then
223b71206888 Initial import
thib
parents:
diff changeset
29 dnl AC_MSG_CHECKING(whether m4 is GNU m4)
223b71206888 Initial import
thib
parents:
diff changeset
30 dnl if $M4 --version < /dev/null 2>/dev/null | grep '^GNU m4 ' >/dev/null ; then
223b71206888 Initial import
thib
parents:
diff changeset
31 dnl AC_MSG_RESULT(yes)
223b71206888 Initial import
thib
parents:
diff changeset
32 dnl else
223b71206888 Initial import
thib
parents:
diff changeset
33 dnl AC_MSG_RESULT(no)
223b71206888 Initial import
thib
parents:
diff changeset
34 dnl if test "$host_vendor" = "sun"; then
223b71206888 Initial import
thib
parents:
diff changeset
35 dnl AC_MSG_ERROR("SUN m4 does not work for building Gtk--. Please install GNU m4")
223b71206888 Initial import
thib
parents:
diff changeset
36 dnl fi
223b71206888 Initial import
thib
parents:
diff changeset
37 dnl fi
223b71206888 Initial import
thib
parents:
diff changeset
38 dnl fi
223b71206888 Initial import
thib
parents:
diff changeset
39 dnl
223b71206888 Initial import
thib
parents:
diff changeset
40 dnl dnl Check that this is GNU m4 - if not, exit with error if this is a SUN
223b71206888 Initial import
thib
parents:
diff changeset
41 dnl dnl
223b71206888 Initial import
thib
parents:
diff changeset
42
223b71206888 Initial import
thib
parents:
diff changeset
43 dnl Checks for header files.
223b71206888 Initial import
thib
parents:
diff changeset
44 AC_HEADER_DIRENT
223b71206888 Initial import
thib
parents:
diff changeset
45 AC_HEADER_STDC
223b71206888 Initial import
thib
parents:
diff changeset
46 AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h)
223b71206888 Initial import
thib
parents:
diff changeset
47
223b71206888 Initial import
thib
parents:
diff changeset
48 dnl Checks for typedefs, structures, and compiler characteristics.
223b71206888 Initial import
thib
parents:
diff changeset
49 AC_C_CONST
223b71206888 Initial import
thib
parents:
diff changeset
50 AC_TYPE_SIZE_T
223b71206888 Initial import
thib
parents:
diff changeset
51 AC_HEADER_TIME
223b71206888 Initial import
thib
parents:
diff changeset
52 AC_STRUCT_TM
223b71206888 Initial import
thib
parents:
diff changeset
53 #X_LIBS="$X_LIBS -lX11 -lXext -L/usr/X11R6/lib"
223b71206888 Initial import
thib
parents:
diff changeset
54
223b71206888 Initial import
thib
parents:
diff changeset
55
223b71206888 Initial import
thib
parents:
diff changeset
56
223b71206888 Initial import
thib
parents:
diff changeset
57 dnl Checks for library functions.
223b71206888 Initial import
thib
parents:
diff changeset
58 AC_PROG_GCC_TRADITIONAL
223b71206888 Initial import
thib
parents:
diff changeset
59 AC_FUNC_MEMCMP
223b71206888 Initial import
thib
parents:
diff changeset
60 AC_FUNC_MMAP
223b71206888 Initial import
thib
parents:
diff changeset
61 AC_TYPE_SIGNAL
223b71206888 Initial import
thib
parents:
diff changeset
62 AC_CHECK_FUNCS(gettimeofday mkdir snprintf)
223b71206888 Initial import
thib
parents:
diff changeset
63 #ac_save_LIBS="$LIBS"
223b71206888 Initial import
thib
parents:
diff changeset
64 #LIBS="$LIBS -pthread"
223b71206888 Initial import
thib
parents:
diff changeset
65 #AC_CHECK_FUNCS(_thread_sys_sigaltstack)
223b71206888 Initial import
thib
parents:
diff changeset
66 #LIBS="$ac_save_LIBS"
223b71206888 Initial import
thib
parents:
diff changeset
67 AC_C_BIGENDIAN
223b71206888 Initial import
thib
parents:
diff changeset
68
223b71206888 Initial import
thib
parents:
diff changeset
69 dnl for gettext
223b71206888 Initial import
thib
parents:
diff changeset
70 dnl ALL_LINGUAS="ja"
223b71206888 Initial import
thib
parents:
diff changeset
71 dnl AM_GNU_GETTEXT
223b71206888 Initial import
thib
parents:
diff changeset
72 AC_CHECK_FUNC(gettext,,AC_CHECK_LIB(intl, gettext))
223b71206888 Initial import
thib
parents:
diff changeset
73
223b71206888 Initial import
thib
parents:
diff changeset
74 dnl >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
223b71206888 Initial import
thib
parents:
diff changeset
75 dnl
223b71206888 Initial import
thib
parents:
diff changeset
76 dnl Check libraries
223b71206888 Initial import
thib
parents:
diff changeset
77
223b71206888 Initial import
thib
parents:
diff changeset
78 AC_CHECK_LIB(z, zlibVersion)
223b71206888 Initial import
thib
parents:
diff changeset
79 AC_CHECK_LIB(png, png_write_end)
223b71206888 Initial import
thib
parents:
diff changeset
80 AC_CHECK_LIB(jpeg, jpeg_start_decompress)
223b71206888 Initial import
thib
parents:
diff changeset
81 dnl ogg vobis
223b71206888 Initial import
thib
parents:
diff changeset
82 AC_ARG_ENABLE(tremor,
223b71206888 Initial import
thib
parents:
diff changeset
83 [ --enable-tremor enable tremor (integer-only implementation for vorbisfile) [ default no]])
223b71206888 Initial import
thib
parents:
diff changeset
84 AC_CHECK_LIB(ogg, ogg_stream_init)
223b71206888 Initial import
thib
parents:
diff changeset
85 AC_CHECK_LIB(vorbis, vorbis_book_decode,,,-logg)
223b71206888 Initial import
thib
parents:
diff changeset
86 if test X$enable_tremor = X"yes"; then
223b71206888 Initial import
thib
parents:
diff changeset
87 AC_CHECK_LIB(vorbisidec, ov_read,,,-logg -lvorbis)
223b71206888 Initial import
thib
parents:
diff changeset
88 else
223b71206888 Initial import
thib
parents:
diff changeset
89 AC_CHECK_LIB(vorbisfile, ov_read,,,-logg -lvorbis)
223b71206888 Initial import
thib
parents:
diff changeset
90 fi
223b71206888 Initial import
thib
parents:
diff changeset
91
223b71206888 Initial import
thib
parents:
diff changeset
92 dnl SDL config
223b71206888 Initial import
thib
parents:
diff changeset
93 AM_PATH_SDL()
223b71206888 Initial import
thib
parents:
diff changeset
94 AC_SUBST(SDL_CFLAGS)
223b71206888 Initial import
thib
parents:
diff changeset
95 AC_SUBST(SDL_LIBS)
223b71206888 Initial import
thib
parents:
diff changeset
96
223b71206888 Initial import
thib
parents:
diff changeset
97 dnl SMPEG & MAD config
223b71206888 Initial import
thib
parents:
diff changeset
98 AM_PATH_SMPEG()
223b71206888 Initial import
thib
parents:
diff changeset
99 AC_SUBST(SMPEG_CFLAGS)
223b71206888 Initial import
thib
parents:
diff changeset
100 AC_SUBST(SMPEG_LIBS)
223b71206888 Initial import
thib
parents:
diff changeset
101 if test X"$SMPEG_LIBS" = X ; then
223b71206888 Initial import
thib
parents:
diff changeset
102 USE_SMPEG=0
223b71206888 Initial import
thib
parents:
diff changeset
103 else
223b71206888 Initial import
thib
parents:
diff changeset
104 USE_SMPEG=1
223b71206888 Initial import
thib
parents:
diff changeset
105 fi
223b71206888 Initial import
thib
parents:
diff changeset
106 AC_ARG_ENABLE(mad,
223b71206888 Initial import
thib
parents:
diff changeset
107 [ --disable-mad disable mad (integer-only implementation for mpeg decoding) [ default yes]])
223b71206888 Initial import
thib
parents:
diff changeset
108 if test X$enable_mad != X"no"; then
223b71206888 Initial import
thib
parents:
diff changeset
109 AC_CHECK_LIB(mad, mad_decoder_run)
223b71206888 Initial import
thib
parents:
diff changeset
110 fi
223b71206888 Initial import
thib
parents:
diff changeset
111
223b71206888 Initial import
thib
parents:
diff changeset
112 AC_DEFINE_UNQUOTED(USE_SMPEG,$USE_SMPEG, [smpeg library is used])
223b71206888 Initial import
thib
parents:
diff changeset
113
223b71206888 Initial import
thib
parents:
diff changeset
114 dnl FreeType2
223b71206888 Initial import
thib
parents:
diff changeset
115 AC_CHECK_FT2()
223b71206888 Initial import
thib
parents:
diff changeset
116 AC_SUBST(FT2_CFLAGS)
223b71206888 Initial import
thib
parents:
diff changeset
117 AC_SUBST(FT2_LIBS)
223b71206888 Initial import
thib
parents:
diff changeset
118
223b71206888 Initial import
thib
parents:
diff changeset
119
223b71206888 Initial import
thib
parents:
diff changeset
120 dnl >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
223b71206888 Initial import
thib
parents:
diff changeset
121 dnl
223b71206888 Initial import
thib
parents:
diff changeset
122 dnl Check option ... Zaurus or embed machines
223b71206888 Initial import
thib
parents:
diff changeset
123 USE_X11=1
223b71206888 Initial import
thib
parents:
diff changeset
124 DISPSIZE="no"
223b71206888 Initial import
thib
parents:
diff changeset
125
223b71206888 Initial import
thib
parents:
diff changeset
126 AC_ARG_ENABLE(zaurus,
223b71206888 Initial import
thib
parents:
diff changeset
127 [ --enable-zaurus compile for zaurus environment [ default no]])
223b71206888 Initial import
thib
parents:
diff changeset
128 if test X$enable_zaurus = X"yes"; then
223b71206888 Initial import
thib
parents:
diff changeset
129 USE_X11=0
223b71206888 Initial import
thib
parents:
diff changeset
130 DISPSIZE="320x240"
223b71206888 Initial import
thib
parents:
diff changeset
131 fi
223b71206888 Initial import
thib
parents:
diff changeset
132
223b71206888 Initial import
thib
parents:
diff changeset
133 AC_ARG_ENABLE(x11,
223b71206888 Initial import
thib
parents:
diff changeset
134 [ --disable-x11 turn off using X11 library [default enable]])
223b71206888 Initial import
thib
parents:
diff changeset
135 if test X$x11 = X"no"; then
223b71206888 Initial import
thib
parents:
diff changeset
136 USE_X11=0
223b71206888 Initial import
thib
parents:
diff changeset
137 else
223b71206888 Initial import
thib
parents:
diff changeset
138 AC_PATH_X
223b71206888 Initial import
thib
parents:
diff changeset
139 AC_PATH_XTRA
223b71206888 Initial import
thib
parents:
diff changeset
140 X_LIBS="$X_LIBS -lX11 -lXext -L/usr/X11R6/lib"
223b71206888 Initial import
thib
parents:
diff changeset
141 LIBS="$LIBS $X_LIBS"
223b71206888 Initial import
thib
parents:
diff changeset
142 fi
223b71206888 Initial import
thib
parents:
diff changeset
143
223b71206888 Initial import
thib
parents:
diff changeset
144 AC_ARG_ENABLE(displaysize,
223b71206888 Initial import
thib
parents:
diff changeset
145 [ --enable-displaysize=SIZE change default display size, for example --enable-displaysize=320x240],
223b71206888 Initial import
thib
parents:
diff changeset
146 displaysize=$enableval)
223b71206888 Initial import
thib
parents:
diff changeset
147 if test X$displaysize != X; then
223b71206888 Initial import
thib
parents:
diff changeset
148 DISPSIZE=$displaysize
223b71206888 Initial import
thib
parents:
diff changeset
149 fi
223b71206888 Initial import
thib
parents:
diff changeset
150
223b71206888 Initial import
thib
parents:
diff changeset
151 AC_DEFINE_UNQUOTED(USE_X11,$USE_X11, [X11 library is used])
223b71206888 Initial import
thib
parents:
diff changeset
152 AC_DEFINE_UNQUOTED(DISPSIZE, "$DISPSIZE", [default display size])
223b71206888 Initial import
thib
parents:
diff changeset
153
223b71206888 Initial import
thib
parents:
diff changeset
154 AC_OUTPUT(Makefile system/Makefile font/Makefile window/Makefile music2/Makefile scn2k/Makefile)