Mercurial > hg > xmms-sid
comparison configure.ac @ 727:369c1f4414e2
Renamed file.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 22 Oct 2009 14:53:14 +0300 |
parents | configure.in@a7342fc5d1db |
children | 171f42746b88 |
comparison
equal
deleted
inserted
replaced
726:53a4210889e2 | 727:369c1f4414e2 |
---|---|
1 dnl *** | |
2 dnl *** Process this file with autoconf to produce a configure script. | |
3 dnl *** | |
4 | |
5 dnl Require autoconf 2.60 or later | |
6 AC_PREREQ([2.60]) | |
7 | |
8 dnl Initialize | |
9 AC_INIT([XMMS-SID], [0.8.0beta20], [ccr@tnsp.org]) | |
10 AC_COPYRIGHT([[(C) 2003-2009 Matti 'ccr' Hamalainen]]) | |
11 AC_CONFIG_SRCDIR([src/xmms-sid.h]) | |
12 AM_INIT_AUTOMAKE | |
13 AC_CONFIG_HEADERS([src/config.h]) | |
14 AM_GNU_GETTEXT_VERSION([0.14]) | |
15 AM_GNU_GETTEXT([external]) | |
16 | |
17 | |
18 dnl *** | |
19 dnl *** Define some templates | |
20 dnl *** | |
21 AH_TEMPLATE([HAVE_SONG_POSITION], [Define if you have XMMS patched with the songpos patch.]) | |
22 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.]) | |
23 AH_TEMPLATE([HAVE_SIDPLAY1], [Define if you have and want to use libSIDPlay 1]) | |
24 AH_TEMPLATE([HAVE_SIDPLAY2], [Define if you have and want to use libSIDPlay 2]) | |
25 AH_TEMPLATE([HAVE_SIDPLAY2_COMI], [Define if you have libSIDPlay2 v2.2.x or later (or CVS version) with the new COMI API]) | |
26 AH_TEMPLATE([HAVE_SIDPLAY2_DISTORTION], [Define if you have libSIDPlay2 + reSID with Antti Lankila's distortion patches (v10 and possibly later) http://bel.fi/~alankila/c64-sw/]) | |
27 AH_TEMPLATE([HAVE_THEMETUNE], [Define if you want to build code to play XMMS-SID theme SID-tune. The tune needs to be installed too, though.]) | |
28 | |
29 | |
30 dnl *** | |
31 dnl *** Some general checks | |
32 dnl *** | |
33 AC_PREFIX_PROGRAM([xmms]) | |
34 AC_DISABLE_STATIC | |
35 AC_LIB_RPATH | |
36 AM_PROG_LIBTOOL | |
37 AC_SYS_LARGEFILE | |
38 | |
39 | |
40 dnl *** | |
41 dnl *** Checks for programs | |
42 dnl *** | |
43 AC_PROG_CC | |
44 AC_PROG_CPP | |
45 AC_PROG_CXX | |
46 AC_PROG_CXXCPP | |
47 AC_PROG_INSTALL | |
48 | |
49 | |
50 dnl *** | |
51 dnl *** Checks for generic libraries | |
52 dnl *** | |
53 AC_CHECK_HEADER([pthread.h],,AC_MSG_ERROR([[*** POSIX thread support not found. Strange, maybe you don't have some development packages installed?]])) | |
54 AM_PATH_GLIB([1.2.5],,AC_MSG_ERROR([[*** GLib >= 1.2.5 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/)]])) | |
55 AM_PATH_GTK([1.2.5],,AC_MSG_ERROR([[*** Gtk+ >= 1.2.5 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]) | |
56 | |
57 | |
58 dnl *** | |
59 dnl *** Checks for header files, types and functions | |
60 dnl *** | |
61 AC_HEADER_STDC | |
62 AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) | |
63 | |
64 AC_TYPE_SIZE_T | |
65 AC_C_CONST | |
66 AC_C_INLINE | |
67 AC_CHECK_FUNCS([memset],[],[[*** memset function not found. Your libc has failed you.]]) | |
68 | |
69 | |
70 dnl *** | |
71 dnl *** Enable or disable themetune support/installation | |
72 dnl *** | |
73 AC_ARG_ENABLE([themetune], | |
74 [AS_HELP_STRING([--disable-themetune], | |
75 [Disable XMMS-SID theme song-related code and installation of the SID-tune file. The tune is not under GNU GPL, refer to README for license.]) | |
76 ], [ | |
77 if test "x$enableval" = "xyes"; then | |
78 xs_have_themetune=yes | |
79 else | |
80 if test "x$enableval" = "xno"; then | |
81 xs_have_themetune=no | |
82 else | |
83 xs_have_themetune=no | |
84 fi | |
85 fi | |
86 ], [xs_have_themetune=yes]) | |
87 if test "x$xs_have_themetune" = "xyes"; then | |
88 AC_DEFINE([HAVE_THEMETUNE]) | |
89 fi | |
90 | |
91 | |
92 dnl *** | |
93 dnl *** libSIDPlay1/2 options | |
94 dnl *** | |
95 XS_ARG_WITH([sidplay1], [libSIDPlay1], [XS_PATH_LIBSIDPLAY1]) | |
96 if test "x$xs_have_sidplay1" = "xyes"; then | |
97 AC_DEFINE([HAVE_SIDPLAY1]) | |
98 fi | |
99 | |
100 XS_ARG_WITH([sidplay2], [libSIDPlay2], [XS_PATH_LIBSIDPLAY2]) | |
101 xs_have_sidplay2_api="" | |
102 xs_have_distortion="no" | |
103 if test "x$xs_have_sidplay2" = "xyes"; then | |
104 AC_DEFINE([HAVE_SIDPLAY2]) | |
105 AC_LANG_PUSH([C++]) | |
106 | |
107 XS_BUILDERS_CHECK | |
108 XS_BUILDERS_FIND([reSID], [resid-builder], [resid.h], [ReSIDBuilder]) | |
109 XS_BUILDERS_FIND([HardSID], [hardsid-builder], [hardsid.h], [HardSID]) | |
110 if test "x$xs_builders_available" = "xno"; then | |
111 AC_MSG_ERROR([No builder modules were found in the sidbuilders directory!]); | |
112 fi | |
113 | |
114 dnl *** Check for new COMI API | |
115 AC_MSG_CHECKING([libSIDPlay2 API style]) | |
116 tmp_CPPFLAGS="$CPPFLAGS" | |
117 if test -d "$xs_sidplay2_includes"; then | |
118 CPPFLAGS="$CPPFLAGS -I${xs_sidplay2_includes}" | |
119 fi | |
120 AC_EGREP_HEADER([SIDIID], [sidplay/sidplay2.h], | |
121 [xs_have_sidplay2_api="yes"], | |
122 [xs_have_sidplay2_api="(old style API)"] | |
123 ) | |
124 if test "x$xs_have_sidplay2_api" = "xyes"; then | |
125 AC_LINK_IFELSE([ | |
126 AC_LANG_PROGRAM( | |
127 [#include <sidplay/sidunknown.h>], | |
128 [ISidUnknown *i;]) | |
129 ], [ | |
130 xs_have_sidplay2_api="(new COMI style API)" | |
131 AC_DEFINE([HAVE_SIDPLAY2_COMI]) | |
132 ],[ | |
133 xs_have_sidplay2_api="(broken version!)" | |
134 ]) | |
135 fi | |
136 AC_MSG_RESULT([$xs_have_sidplay2_api]) | |
137 | |
138 AC_LANG_POP([C++]) | |
139 | |
140 dnl *** Check for distortion patch | |
141 AC_MSG_CHECKING([libSIDPlay2+reSID distortion patch]) | |
142 AC_EGREP_HEADER([minimumfetresistance], [sidplay/sidtypes.h], [ | |
143 xs_have_distortion="yes" | |
144 AC_DEFINE([HAVE_SIDPLAY2_DISTORTION]) | |
145 ],[ | |
146 xs_have_distortion="no" | |
147 ]) | |
148 AC_MSG_RESULT([$xs_have_distortion]) | |
149 CPPFLAGS="$tmp_CPPFLAGS" | |
150 fi | |
151 | |
152 | |
153 dnl *** | |
154 dnl *** Check if we have some emulator library available? | |
155 dnl *** | |
156 if test "x$xs_have_sidplay1" = "xno" && test "x$xs_have_sidplay2" = "xno"; then | |
157 AC_MSG_ERROR([Either libSIDPlay1 or libSIDPlay2 is required! Please read INSTALL for more information!]) | |
158 fi | |
159 | |
160 | |
161 dnl *** | |
162 dnl *** Song position patch check | |
163 dnl *** | |
164 AC_MSG_CHECKING([for song position patch]) | |
165 tmp_CPPFLAGS="$CPPFLAGS" | |
166 if test -d "$prefix"; then | |
167 CPPFLAGS="$CPPFLAGS -I${prefix}/include" | |
168 fi | |
169 | |
170 AC_EGREP_HEADER([set_song_position], [xmms/plugin.h], [ | |
171 xs_have_songpos="yes" | |
172 AC_DEFINE([HAVE_SONG_POSITION]) | |
173 ],[ | |
174 xs_have_songpos="no" | |
175 ]) | |
176 AC_MSG_RESULT([$xs_have_songpos]) | |
177 CPPFLAGS="$tmp_CPPFLAGS" | |
178 | |
179 | |
180 dnl *** | |
181 dnl *** Check XMMS version | |
182 dnl *** | |
183 AM_PATH_XMMS([1.2.0],, [ | |
184 AC_MSG_ERROR([*** XMMS >= 1.2.0 not found. You need XMMS v1.2.0 or later to use XMMS-SID plugin.]) | |
185 ]) | |
186 libdir="$XMMS_INPUT_PLUGIN_DIR" | |
187 | |
188 XMMS_TEST_VERSION([$XMMS_VERSION], [1.2.5], [ | |
189 AC_DEFINE([HAVE_XMMSEXTRA]) | |
190 xs_have_xmmsextra="yes" | |
191 ], [ | |
192 xs_have_xmmsextra="no" | |
193 ]) | |
194 | |
195 | |
196 dnl *** | |
197 dnl *** And finally, output the all generatable files! | |
198 dnl *** | |
199 AC_CONFIG_FILES([ | |
200 Makefile | |
201 xmms-sid.spec | |
202 po/Makefile.in | |
203 ]) | |
204 AC_OUTPUT | |
205 | |
206 | |
207 dnl *** | |
208 dnl *** Show the result message | |
209 dnl *** | |
210 AC_MSG_RESULT([ | |
211 $PACKAGE_STRING has been configured successfully: | |
212 | |
213 Installation directory : $libdir | |
214 XMMS >= v1.2.5 extra features : $xs_have_xmmsextra | |
215 Song-position patch : $xs_have_songpos | |
216 libSIDPlay 1 support : $xs_have_sidplay1 | |
217 libSIDPlay 2 support : $xs_have_sidplay2 $xs_have_sidplay2_api | |
218 With distortion patch? : $xs_have_distortion | |
219 Included builders : $xs_builders | |
220 XMMS-SID theme SID-tune : $xs_have_themetune | |
221 Translations (i18n/nls) : $USE_NLS | |
222 ]) | |
223 | |
224 if test "x$xs_have_distortion" = "xyes"; then | |
225 echo "***" | |
226 echo "*** WARNING! A version of libSIDPlay2 with Antti Lankila's distortion" | |
227 echo "*** patches has been detected. Due to the fast-changing nature of this" | |
228 echo "*** particular patch-set, it is possible that this version of XMMS-SID" | |
229 echo "*** may be incompatible." | |
230 echo "***" | |
231 echo "*** If you encounter any compilation problems, try a non-patched" | |
232 echo "*** version of libSIDPlay2+reSID." | |
233 echo "***" | |
234 fi |