Mercurial > hg > xmms-sid
comparison configure.in @ 79:b3e17bb32b21
Re-added support for detection of song-position patch,
bumped version to 0.8.0beta3
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 03 Oct 2003 03:13:02 +0000 |
parents | fd610bb817bc |
children | 0cf08d137248 |
comparison
equal
deleted
inserted
replaced
78:ab522ab65c85 | 79:b3e17bb32b21 |
---|---|
4 | 4 |
5 dnl Require autoconf 2.56 or later | 5 dnl Require autoconf 2.56 or later |
6 AC_PREREQ(2.56) | 6 AC_PREREQ(2.56) |
7 | 7 |
8 dnl Initialize | 8 dnl Initialize |
9 AC_INIT(XMMS-SID, 0.8.0alpha0, ccr@tnsp.org) | 9 AC_INIT(XMMS-SID, 0.8.0beta3, ccr@tnsp.org) |
10 AC_COPYRIGHT([[(C) 2002-2003 Matti 'ccr' Hämäläinen]]) | 10 AC_COPYRIGHT([[(C) 2002-2003 Matti 'ccr' Hämäläinen]]) |
11 AC_CONFIG_SRCDIR(src/xmms-sid.h) | 11 AC_CONFIG_SRCDIR(src/xmms-sid.h) |
12 AM_INIT_AUTOMAKE | 12 AM_INIT_AUTOMAKE |
13 AC_CONFIG_HEADERS(src/config.h) | 13 AC_CONFIG_HEADERS(src/config.h) |
14 | 14 |
15 | 15 |
16 dnl *** | 16 dnl *** |
17 dnl *** Define some templates | 17 dnl *** Define some templates |
18 dnl *** | 18 dnl *** |
19 AH_TEMPLATE([HAVE_SONG_POSITION],[Define if you have XMMS patched with the songpos patch.]) | |
19 AH_TEMPLATE([HAVE_XMMSEXTRA],[Define if you have XMMS version 1.2.5 or later and you want XMMS-SID to support some extra features.]) | 20 AH_TEMPLATE([HAVE_XMMSEXTRA],[Define if you have XMMS version 1.2.5 or later and you want XMMS-SID to support some extra features.]) |
20 AH_TEMPLATE([HAVE_UNSIGNEDPCM],[Define if your audiodevice supports _ONLY_ UNSIGNED PCM samples, otherwise leave undefined.]) | 21 AH_TEMPLATE([HAVE_UNSIGNEDPCM],[Define if your audiodevice supports _ONLY_ UNSIGNED PCM samples, otherwise leave undefined.]) |
21 AH_TEMPLATE([HAVE_SIDPLAY1],[Define if you have and want to use libSIDPlay 1]) | 22 AH_TEMPLATE([HAVE_SIDPLAY1],[Define if you have and want to use libSIDPlay 1]) |
22 AH_TEMPLATE([HAVE_SIDPLAY2],[Define if you have and want to use libSIDPlay 2]) | 23 AH_TEMPLATE([HAVE_SIDPLAY2],[Define if you have and want to use libSIDPlay 2]) |
23 AH_TEMPLATE([HAVE_RESID_BUILDER],[Define if you have reSID with libSIDPlay 2]) | 24 AH_TEMPLATE([HAVE_RESID_BUILDER],[Define if you have reSID with libSIDPlay 2]) |
48 AM_PATH_GLIB(1.2.8,,AC_MSG_ERROR([*** GLib >= 1.2.8 not found. You either don't have GLib at all or your GLib is too old. Latest GLib can be found from Gtk+ homepages (http://www.gtk.org/)])) | 49 AM_PATH_GLIB(1.2.8,,AC_MSG_ERROR([*** GLib >= 1.2.8 not found. You either don't have GLib at all or your GLib is too old. Latest GLib can be found from Gtk+ homepages (http://www.gtk.org/)])) |
49 AM_PATH_GTK(1.2.8,,AC_MSG_ERROR([*** Gtk+ >= 1.2.8 not found. You either don't have Gtk+ at all or your Gtk+ is too old. Latest Gtk+ can be found from Gtk+ homepages (http://www.gtk.org/)]), gthread) | 50 AM_PATH_GTK(1.2.8,,AC_MSG_ERROR([*** Gtk+ >= 1.2.8 not found. You either don't have Gtk+ at all or your Gtk+ is too old. Latest Gtk+ can be found from Gtk+ homepages (http://www.gtk.org/)]), gthread) |
50 | 51 |
51 | 52 |
52 dnl *** | 53 dnl *** |
54 dnl *** Checks for header files, types and functions | |
55 dnl *** | |
56 AC_HEADER_STDC | |
57 AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) | |
58 | |
59 AC_HEADER_STDBOOL | |
60 AC_TYPE_SIZE_T | |
61 AC_C_CONST | |
62 AC_C_INLINE | |
63 AC_C_VOLATILE | |
64 AC_C_BIGENDIAN | |
65 | |
66 AC_FUNC_MALLOC | |
67 AC_TYPE_SIGNAL | |
68 AC_FUNC_STAT | |
69 AC_CHECK_FUNCS([memset strcasecmp strerror strrchr]) | |
70 | |
71 | |
72 dnl *** | |
53 dnl *** Check some options | 73 dnl *** Check some options |
54 dnl *** | 74 dnl *** |
55 AC_ARG_WITH(unsigned-pcm, | 75 AC_ARG_WITH(unsigned-pcm, |
56 [ | 76 [ |
57 --with-unsigned-pcm Prefer UNsigned PCM format for audio. Use | 77 --with-unsigned-pcm Prefer UNsigned PCM format for audio. Use |
58 this option if your audio hardware does not | 78 this option if your audio hardware does not |
59 support signed format PCM samples.], | 79 support signed format PCM samples.], |
60 [ | 80 [ |
81 if test "$withval" = yes; then | |
61 AC_DEFINE(HAVE_UNSIGNEDPCM) | 82 AC_DEFINE(HAVE_UNSIGNEDPCM) |
83 fi | |
62 ],[]) | 84 ],[]) |
63 | 85 |
64 | 86 |
65 dnl *** | 87 dnl *** |
66 dnl *** libSIDPlay 1 options | 88 dnl *** libSIDPlay 1 options |
81 xs_sidplay1_includes="$withval/include" | 103 xs_sidplay1_includes="$withval/include" |
82 xs_sidplay1_library="$withval/lib" | 104 xs_sidplay1_library="$withval/lib" |
83 fi | 105 fi |
84 fi | 106 fi |
85 ],[ | 107 ],[ |
86 xs_sidplay1=yes | 108 xs_sidplay1=xtry |
87 xs_sidplay1_library="" | 109 xs_sidplay1_library="" |
88 xs_sidplay1_includes="" | 110 xs_sidplay1_includes="" |
89 ]) | 111 ]) |
90 | 112 |
91 AC_ARG_WITH(sidplay1-inc, | 113 AC_ARG_WITH(sidplay1-inc, |
103 AC_ARG_WITH(sidplay2, | 125 AC_ARG_WITH(sidplay2, |
104 [ | 126 [ |
105 --with-sidplay2=PREFIX Enable SIDPlay2 with install-PREFIX], | 127 --with-sidplay2=PREFIX Enable SIDPlay2 with install-PREFIX], |
106 [ | 128 [ |
107 if test "$withval" = yes; then | 129 if test "$withval" = yes; then |
108 xs_sidplay1=no | |
109 xs_sidplay2=yes | 130 xs_sidplay2=yes |
110 xs_sidplay2_library="" | 131 xs_sidplay2_library="" |
111 xs_sidplay2_includes="" | 132 xs_sidplay2_includes="" |
112 else | 133 else |
113 if test "$withval" = no; then | 134 if test "$withval" = no; then |
114 xs_sidplay2=no | 135 xs_sidplay2=no |
115 else | 136 else |
116 xs_sidplay2=yes | 137 xs_sidplay2=yes |
117 xs_sidplay1=no | |
118 xs_sidplay2_includes="$withval/include" | 138 xs_sidplay2_includes="$withval/include" |
119 xs_sidplay2_library="$withval/lib" | 139 xs_sidplay2_library="$withval/lib" |
120 fi | 140 fi |
121 fi | 141 fi |
122 ],[ | 142 ],[ |
123 xs_sidplay2=yes | 143 xs_sidplay2=xtry |
124 xs_sidplay2_library="" | 144 xs_sidplay2_library="" |
125 xs_sidplay2_includes="" | 145 xs_sidplay2_includes="" |
126 ]) | 146 ]) |
127 | 147 |
128 AC_ARG_WITH(sidplay2-inc, | 148 AC_ARG_WITH(sidplay2-inc, |
134 [xs_sidplay2_library="$withval"],) | 154 [xs_sidplay2_library="$withval"],) |
135 | 155 |
136 | 156 |
137 dnl *** Determine if libraries are wanted and available | 157 dnl *** Determine if libraries are wanted and available |
138 OPT_SIDPLAY1="no" | 158 OPT_SIDPLAY1="no" |
139 if test "$xs_sidplay1" = yes; then | 159 if test "$xs_sidplay1" = xtry; then |
140 XS_PATH_LIBSIDPLAY1 | 160 XS_PATH_LIBSIDPLAY1 |
161 else | |
162 if test "$xs_sidplay1" = yes; then | |
163 XS_PATH_LIBSIDPLAY1 | |
164 if test "$xs_have_sidplay1" = no; then | |
165 AC_MSG_ERROR([libSIDPlay1 library and/or headers were not found!]) | |
166 fi | |
167 fi | |
168 fi | |
141 if test "$xs_have_sidplay1" = yes; then | 169 if test "$xs_have_sidplay1" = yes; then |
142 AC_DEFINE(HAVE_SIDPLAY1) | 170 AC_DEFINE(HAVE_SIDPLAY1) |
143 AC_SUBST(REQUIRE_LIBRARY,[libsidplay.so.1]) | 171 AC_SUBST(REQUIRE_LIBRARY,[libsidplay.so.1]) |
144 OPT_SIDPLAY1="yes" | 172 OPT_SIDPLAY1="yes" |
145 else | 173 fi |
146 AC_MSG_ERROR([libSIDPlay1 library and/or headers were not found!]) | 174 |
147 fi | |
148 fi | |
149 | 175 |
150 | 176 |
151 OPT_SIDPLAY2="no" | 177 OPT_SIDPLAY2="no" |
152 if test "$OPT_SIDPLAY1" = no; then | |
153 if test "$xs_sidplay2" = yes; then | |
154 LIBSIDPLAY2_REQUIRED_VERSION="2.1.0" | 178 LIBSIDPLAY2_REQUIRED_VERSION="2.1.0" |
155 XS_PATH_LIBSIDPLAY2 | 179 if test "$xs_sidplay2" = xtry; then |
180 XS_PATH_LIBSIDPLAY2 | |
181 else | |
182 if test "$xs_sidplay2" = yes; then | |
183 XS_PATH_LIBSIDPLAY2 | |
184 if test "$xs_have_sidplay2" = no; then | |
185 AC_MSG_ERROR([libSIDPlay2 library and/or headers were not found!]) | |
186 fi | |
187 fi | |
188 fi | |
156 if test "$xs_have_sidplay2" = yes; then | 189 if test "$xs_have_sidplay2" = yes; then |
157 AC_DEFINE(HAVE_SIDPLAY2) | 190 AC_DEFINE(HAVE_SIDPLAY2) |
158 AC_SUBST(REQUIRE_LIBRARY,[libsidplay2.so.1]) | 191 AC_SUBST(REQUIRE_LIBRARY,[libsidplay.so.2]) |
159 OPT_SIDPLAY2="yes" | 192 OPT_SIDPLAY2="yes" |
160 BUILDERS_FIND | 193 BUILDERS_FIND |
161 BUILDERS_FIND_RESID | 194 BUILDERS_FIND_RESID |
162 BUILDERS_FIND_HARDSID | 195 BUILDERS_FIND_HARDSID |
163 if test "$builders_available" = no; then | 196 if test "$builders_available" = no; then |
164 AC_MSG_ERROR([No builder modules were found in the sidbuilders directory!]); | 197 AC_MSG_ERROR([No builder modules were found in the sidbuilders directory!]); |
165 fi | 198 fi |
166 else | |
167 AC_MSG_ERROR([libSIDPlay2 library and/or headers were not found!]) | |
168 fi | |
169 fi | |
170 fi | 199 fi |
171 | 200 |
172 | 201 |
173 dnl *** Check if we have some emulator library available? | 202 dnl *** Check if we have some emulator library available? |
174 if test "$OPT_SIDPLAY1" = no; then | 203 if test "$OPT_SIDPLAY1" = no; then |
175 if test "$OPT_SIDPLAY2" = no; then | 204 if test "$OPT_SIDPLAY2" = no; then |
176 AC_MSG_ERROR([Either libSIDPlay1 or libSIDPlay2 is required! Please read INSTALL for more information!]) | 205 AC_MSG_ERROR([Either libSIDPlay1 or libSIDPlay2 is required! Please read INSTALL for more information!]) |
177 fi | 206 fi |
178 fi | 207 fi |
179 | 208 |
180 dnl *** | 209 |
181 dnl *** Checks for header files, types and functions | 210 dnl *** |
182 dnl *** | 211 dnl *** Song position patch check |
183 AC_HEADER_STDC | 212 dnl *** |
184 AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) | 213 AC_MSG_CHECKING([for song position patch]) |
185 | 214 tmp_CPPFLAGS=$CPPFLAGS |
186 AC_HEADER_STDBOOL | 215 if test -d "$prefix" ;then |
187 AC_TYPE_SIZE_T | 216 CPPFLAGS="$CPPFLAGS -I${prefix}/include" |
188 AC_C_CONST | 217 fi |
189 AC_C_INLINE | 218 |
190 AC_C_VOLATILE | 219 AC_EGREP_HEADER(set_song_position,xmms/plugin.h, |
191 AC_C_BIGENDIAN | 220 [ |
192 | 221 OPT_SONGPOS="yes" |
193 AC_FUNC_MALLOC | 222 AC_DEFINE(HAVE_SONG_POSITION) |
194 AC_TYPE_SIGNAL | 223 AC_MSG_RESULT([yes]) |
195 AC_FUNC_STAT | 224 ],[ |
196 AC_CHECK_FUNCS([memset strcasecmp strerror strrchr]) | 225 OPT_SONGPOS="no" |
226 AC_MSG_RESULT([no]) | |
227 ]) | |
228 | |
229 CPPFLAGS=$tmp_CPPFLAGS | |
197 | 230 |
198 | 231 |
199 dnl *** | 232 dnl *** |
200 dnl *** Check XMMS version | 233 dnl *** Check XMMS version |
201 dnl *** | 234 dnl *** |
229 AC_MSG_RESULT([ | 262 AC_MSG_RESULT([ |
230 XMMS-SID has been configured successfully: | 263 XMMS-SID has been configured successfully: |
231 | 264 |
232 Installation directory : $libdir | 265 Installation directory : $libdir |
233 XMMS >= v1.2.5 extra features : $OPT_XMMSEXTRA | 266 XMMS >= v1.2.5 extra features : $OPT_XMMSEXTRA |
267 Song-position patch : $OPT_SONGPOS | |
234 libSIDPlay 1 support : $OPT_SIDPLAY1 | 268 libSIDPlay 1 support : $OPT_SIDPLAY1 |
235 libSIDPlay 2 support : $OPT_SIDPLAY2 | 269 libSIDPlay 2 support : $OPT_SIDPLAY2 |
236 Included builders : $xs_builders | 270 Included builders : $xs_builders |
237 | 271 |
238 ]) | 272 ]) |