271
|
1 # Configure paths for SID support
|
|
2
|
|
3 dnl -------------------------------------------------------------------------
|
|
4 dnl Try to find a file (or one of more files in a list of dirs).
|
|
5 dnl -------------------------------------------------------------------------
|
|
6
|
|
7 AC_DEFUN([SIDPLAY_FIND_FILE],
|
|
8 [
|
|
9 $3=""
|
|
10 for i in $2; do
|
|
11 for j in $1; do
|
|
12 if test -r "$i/$j"; then
|
|
13 $3=$i
|
|
14 break 2
|
|
15 fi
|
|
16 done
|
|
17 done
|
|
18 ])
|
|
19
|
|
20 AC_DEFUN([SIDPLAY_TRY_LINK_SAVE],
|
|
21 [
|
|
22 xs_cxx_save="$CXX"
|
|
23 xs_cxxflags_save="$CXXFLAGS"
|
|
24 xs_ldflags_save="$LDFLAGS"
|
|
25 xs_libs_save="$LIBS"
|
|
26 ])
|
|
27
|
|
28
|
|
29 AC_DEFUN([SIDPLAY_TRY_LINK_RESTORE],
|
|
30 [
|
|
31 CXX="$xs_cxx_save"
|
|
32 CXXFLAGS="$xs_cxxflags_save"
|
|
33 LDFLAGS="$xs_ldflags_save"
|
|
34 LIBS="$xs_libs_save"
|
|
35 ])
|
|
36
|
|
37
|
|
38 dnl -------------------------------------------------------------------------
|
|
39 dnl Try to find SIDPLAY library and header files.
|
|
40 dnl $xs_have_sidplay1 will be "yes" or "no"
|
|
41 dnl @SIDPLAY1_LDADD@ will be substituted with linker parameters
|
|
42 dnl @SIDPLAY1_INCLUDES@ will be substituted with compiler parameters
|
|
43 dnl -------------------------------------------------------------------------
|
|
44
|
|
45 AC_DEFUN([XS_PATH_LIBSIDPLAY1],
|
|
46 [
|
|
47 AC_MSG_CHECKING([for working SIDPlay1 library and headers])
|
|
48
|
|
49 AC_LANG_PUSH([C++])
|
|
50
|
|
51 # Use include path given by user (if any).
|
|
52 if test -n "$xs_sidplay1_includes"; then
|
|
53 xs_sidplay1_cxxflags="-I$xs_sidplay1_includes"
|
|
54 else
|
|
55 xs_sidplay1_cxxflags=""
|
|
56 fi
|
|
57
|
|
58 # Use library path given by user (if any).
|
|
59 if test -n "$xs_sidplay1_library"; then
|
|
60 xs_sidplay1_ldflags="-L$xs_sidplay1_library"
|
|
61 else
|
|
62 xs_sidplay1_ldflags=""
|
|
63 fi
|
|
64
|
|
65 AC_CACHE_VAL(xs_cv_have_sidplay1,
|
|
66 [
|
|
67 # Run test compilation with either standard search path
|
|
68 # or user-defined paths.
|
|
69 SIDPLAY_TRY_LIBSIDPLAY1
|
|
70 if test "$xs_sidplay1_works" = yes; then
|
|
71 xs_cv_have_sidplay1="xs_have_sidplay1=yes \
|
|
72 xs_sidplay1_cxxflags=\"$xs_sidplay1_cxxflags\" \
|
|
73 xs_sidplay1_ldflags=\"$xs_sidplay1_ldflags\" "
|
|
74 else
|
|
75 SIDPLAY_FIND_LIBSIDPLAY1
|
|
76 fi
|
|
77 ])
|
|
78
|
|
79 eval "$xs_cv_have_sidplay1"
|
|
80
|
|
81 if test "$xs_have_sidplay1" = yes; then
|
|
82 if test -n "$xs_sidplay1_cxxflags" || test -n "$xs_sidplay1_ldflags"; then
|
|
83 AC_MSG_RESULT([$xs_sidplay1_cxxflags $xs_sidplay1_ldflags])
|
|
84 else
|
|
85 AC_MSG_RESULT([yes])
|
|
86 fi
|
|
87
|
|
88 SIDPLAY1_LDADD="$xs_sidplay1_ldflags -lsidplay"
|
|
89 SIDPLAY1_INCLUDES="$xs_sidplay1_cxxflags"
|
|
90 AC_SUBST([SIDPLAY1_LDADD])
|
|
91 AC_SUBST([SIDPLAY1_INCLUDES])
|
|
92 else
|
|
93 AC_MSG_RESULT([no])
|
|
94 fi
|
|
95
|
|
96 AC_LANG_POP([C++])
|
|
97 ])
|
|
98
|
|
99 dnl Functions used by XS_PATH_LIBSIDPLAY1.
|
|
100
|
|
101 AC_DEFUN([SIDPLAY_FIND_LIBSIDPLAY1],
|
|
102 [
|
|
103 # Search common locations where header files might be stored.
|
|
104 xs_sidplay1_incdirs="$xs_sidplay1_includes /usr/include /usr/local/include /usr/lib/sidplay/include /usr/local/lib/sidplay/include /opt/sfw/include /opt/csw/include"
|
|
105 SIDPLAY_FIND_FILE(sidplay/sidtune.h, $xs_sidplay1_incdirs, xs_sidplay1_includes)
|
|
106
|
|
107 # Search common locations where library might be stored.
|
|
108 xs_sidplay1_libdirs="$xs_sidplay1_library /usr/lib /usr/lib/sidplay /usr/local/lib/sidplay /opt/sfw/lib /opt/csw/lib"
|
|
109 SIDPLAY_FIND_FILE(libsidplay.a libsidplay.so libsidplay.so.1 libsidplay.so.1.36 libsidplay.so.1.37,
|
|
110 $xs_sidplay1_libdirs, xs_sidplay1_library)
|
|
111
|
|
112 if test -z "$xs_sidplay1_includes" || test -z "$xs_sidplay1_library"; then
|
|
113 xs_cv_have_sidplay1="xs_have_sidplay1=no \
|
|
114 xs_sidplay1_ldflags=\"\" xs_sidplay1_cxxflags=\"\" "
|
|
115 else
|
|
116 # Test compilation with found paths.
|
|
117 xs_sidplay1_ldflags="-L$xs_sidplay1_library"
|
|
118 xs_sidplay1_cxxflags="-I$xs_sidplay1_includes"
|
|
119 SIDPLAY_TRY_LIBSIDPLAY1
|
|
120 xs_cv_have_sidplay1="xs_have_sidplay1=$xs_sidplay1_works \
|
|
121 xs_sidplay1_ldflags=\"$xs_sidplay1_ldflags\" \
|
|
122 xs_sidplay1_cxxflags=\"$xs_sidplay1_cxxflags\" "
|
|
123 fi
|
|
124 ])
|
|
125
|
|
126 AC_DEFUN([SIDPLAY_TRY_LIBSIDPLAY1],
|
|
127 [
|
|
128 SIDPLAY_TRY_LINK_SAVE
|
|
129
|
|
130 CXXFLAGS="$CXXFLAGS $xs_sidplay1_cxxflags"
|
|
131 LDFLAGS="$LDFLAGS $xs_sidplay1_ldflags"
|
|
132 LIBS="$LIBS -lsidplay"
|
|
133
|
|
134 AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
|
135 [[#include <sidplay/sidtune.h>]],
|
|
136 [[sidTune* myTest = new sidTune(0);]])],
|
|
137 [xs_sidplay1_works=yes],
|
|
138 [xs_sidplay1_works=no]
|
|
139 )
|
|
140
|
|
141 SIDPLAY_TRY_LINK_RESTORE
|
|
142 ])
|
|
143
|
|
144
|
|
145
|
|
146
|
|
147
|
|
148 dnl -------------------------------------------------------------------------
|
|
149 dnl Try to find SIDPLAY2 library and header files.
|
|
150 dnl $xs_have_sidplay2 will be "yes" or "no"
|
|
151 dnl @SIDPLAY_LDADD@ will be substituted with linker parameters
|
|
152 dnl @SIDPLAY_INCLUDES@ will be substituted with compiler parameters
|
|
153 dnl -------------------------------------------------------------------------
|
|
154 AC_DEFUN([XS_PATH_LIBSIDPLAY2],
|
|
155 [
|
|
156 AC_MSG_CHECKING([for working SIDPlay2 library and headers])
|
|
157
|
|
158 AC_LANG_PUSH([C++])
|
|
159
|
|
160 AC_PATH_PROG([PKG_CONFIG], [pkg-config])
|
|
161 if test -n "$PKG_CONFIG" && $PKG_CONFIG --atleast-version $LIBSIDPLAY2_REQUIRED_VERSION libsidplay2; then
|
|
162 xs_pkgcfg_knows=yes
|
|
163 else
|
|
164 xs_pkgcfg_knows=no
|
|
165 fi
|
|
166
|
|
167 # Derive sidbuilders path from libsidplay2 root.
|
|
168 if test -n "$xs_sidplay2_library"; then
|
|
169 xs_sidplay2_builders="$xs_sidplay2_library/sidplay/builders"
|
|
170 elif test "$xs_pkgcfg_knows" = yes ; then
|
|
171 xs_sidplay2_builders=`$PKG_CONFIG --variable=builders libsidplay2`
|
|
172 fi
|
|
173
|
|
174 AC_CACHE_VAL(xs_cv_have_sidplay2,
|
|
175 [
|
|
176 # Run test compilation with either standard search path
|
|
177 # or user-defined paths.
|
|
178 xs_sidplay2_ldadd="-lsidplay2"
|
|
179 SIDPLAY_TRY_LIBSIDPLAY2
|
|
180 if test "$xs_sidplay2_works" = yes; then
|
|
181 xs_cv_have_sidplay2="xs_have_sidplay2=yes \
|
|
182 xs_sidplay2_cxxflags=\"$xs_sidplay2_cxxflags\" \
|
|
183 xs_sidplay2_ldadd=\"$xs_sidplay2_ldadd\" \
|
|
184 xs_sidplay2_builders=\"$xs_sidplay2_builders\" "
|
|
185 else
|
|
186 SIDPLAY_FIND_LIBSIDPLAY2
|
|
187 fi
|
|
188 ])
|
|
189 eval "$xs_cv_have_sidplay2"
|
|
190 if test "$xs_have_sidplay2" = yes; then
|
|
191 if test -n "$xs_sidplay2_cxxflags" || test -n "$xs_sidplay2_ldadd"; then
|
|
192 AC_MSG_RESULT([$xs_sidplay2_cxxflags $xs_sidplay2_ldadd])
|
|
193 else
|
|
194 AC_MSG_RESULT([yes])
|
|
195 fi
|
|
196
|
|
197 SIDPLAY2_LDADD="$xs_sidplay2_ldadd"
|
|
198 SIDPLAY2_INCLUDES="$xs_sidplay2_cxxflags"
|
|
199 AC_SUBST([SIDPLAY2_LDADD])
|
|
200 AC_SUBST([SIDPLAY2_INCLUDES])
|
|
201 else
|
|
202 AC_MSG_RESULT([no])
|
|
203 fi
|
|
204
|
|
205 AC_LANG_POP([C++])
|
|
206 ])
|
|
207
|
|
208
|
|
209 dnl Functions used by XS_PATH_LIBSIDPLAY2.
|
|
210 AC_DEFUN([SIDPLAY_FIND_LIBSIDPLAY2],
|
|
211 [
|
|
212 # See whether user didn't provide paths.
|
|
213 if test -z "$xs_sidplay2_includes"; then
|
|
214 if test "$xs_pkgcfg_knows" = yes ; then
|
|
215 xs_sidplay2_includes=`$PKG_CONFIG --variable=includedir libsidplay2`
|
|
216 xs_sidplay2_cxxflags=`$PKG_CONFIG --cflags libsidplay2`
|
|
217 else
|
|
218 # Search common locations where header files might be stored.
|
|
219 xs_sidplay2_incdirs="$xs_sidplay2_includes $xs_sidplay2_includes/include /usr/include /usr/local/include /usr/lib/sidplay/include /usr/local/lib/sidplay/include /opt/sfw/include /opt/csw/include"
|
|
220 SIDPLAY_FIND_FILE(sidplay/sidplay2.h,$xs_sidplay2_incdirs,xs_sidplay2_includes)
|
|
221 xs_sidplay2_cxxflags="-I$xs_sidplay2_includes"
|
|
222 fi
|
|
223 else
|
|
224 xs_sidplay2_cxxflags="-I$xs_sidplay2_includes"
|
|
225 fi
|
|
226 if test -z "$xs_sidplay2_library"; then
|
|
227 if test "$xs_pkgcfg_knows" = yes ; then
|
|
228 xs_sidplay2_library=`$PKG_CONFIG --variable=libdir libsidplay2`
|
|
229 xs_sidplay2_ldadd=`$PKG_CONFIG --libs libsidplay2`
|
|
230 xs_sidplay2_builders=`$PKG_CONFIG --variable=builders libsidplay2`
|
|
231 else
|
|
232 # Search common locations where library might be stored.
|
|
233 xs_sidplay2_libdirs="$xs_sidplay2_library $xs_sidplay2_library/lib $xs_sidplay2_library/src /usr/lib /usr/lib/sidplay /usr/local/lib/sidplay /opt/sfw/lib /opt/csw/lib"
|
|
234 SIDPLAY_FIND_FILE(libsidplay2.la,$xs_sidplay2_libdirs,xs_sidplay2_library)
|
|
235 xs_sidplay2_ldadd="-L$xs_sidplay2_library -lsidplay2"
|
|
236 xs_sidplay2_builders="$xs_sidplay2_library/sidplay/builders"
|
|
237 fi
|
|
238 else
|
|
239 xs_sidplay2_ldadd="-L$xs_sidplay2_library -lsidplay2"
|
|
240 fi
|
|
241 if test -z "$xs_sidplay2_includes" || test -z "$xs_sidplay2_library"; then
|
|
242 xs_cv_have_sidplay2="xs_have_sidplay2=no \
|
|
243 xs_sidplay2_ldadd=\"\" xs_sidplay2_cxxflags=\"\" \
|
|
244 xs_sidplay2_builders=\"\" "
|
|
245 else
|
|
246 # Test compilation with found paths.
|
|
247 xs_sidplay2_ldadd="-L$xs_sidplay2_library -lsidplay2"
|
|
248 xs_sidplay2_cxxflags="-I$xs_sidplay2_includes"
|
|
249 SIDPLAY_TRY_LIBSIDPLAY2
|
|
250 xs_cv_have_sidplay2="xs_have_sidplay2=$xs_sidplay2_works \
|
|
251 xs_sidplay2_ldadd=\"$xs_sidplay2_ldadd\" \
|
|
252 xs_sidplay2_cxxflags=\"$xs_sidplay2_cxxflags\" \
|
|
253 xs_sidplay2_builders=\"$xs_sidplay2_builders\" "
|
|
254 fi
|
|
255 ])
|
|
256
|
|
257
|
|
258 AC_DEFUN([SIDPLAY_TRY_LIBSIDPLAY2],
|
|
259 [
|
|
260 SIDPLAY_TRY_LINK_SAVE
|
|
261
|
|
262 CXX="${SHELL-/bin/sh} ${srcdir}/libtool $CXX"
|
|
263 CXXFLAGS="$CXXFLAGS $xs_sidplay2_cxxflags -DHAVE_UNIX"
|
|
264 LDFLAGS="$LDFLAGS $xs_sidplay2_ldadd"
|
|
265
|
|
266 AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
|
267 [[#include <sidplay/sidplay2.h>]],
|
|
268 [[sidplay2 *myEngine;]])],
|
|
269 [xs_sidplay2_works=yes],
|
|
270 [xs_sidplay2_works=no]
|
|
271 )
|
|
272
|
|
273 SIDPLAY_TRY_LINK_RESTORE
|
|
274 ])
|
|
275
|
|
276
|
|
277 dnl -------------------------------------------------------------------------
|
|
278 dnl Find libsidplay2 builders (sidbuilders) dir.
|
|
279 dnl @BUILDERS_INCLUDES@
|
|
280 dnl @BUILDERS_LDFLAGS@
|
|
281 dnl -------------------------------------------------------------------------
|
|
282 AC_DEFUN([BUILDERS_FIND],
|
|
283 [
|
|
284 AC_MSG_CHECKING([for SIDPlay2 builders directory])
|
|
285
|
|
286 AC_LANG_PUSH([C++])
|
|
287
|
|
288 AC_REQUIRE([XS_PATH_LIBSIDPLAY2])
|
|
289
|
|
290 dnl Be pessimistic.
|
|
291 builders_available=no
|
|
292
|
|
293 dnl Sidbuilder headers are included with "builders" prefix.
|
|
294 builders_includedir=$xs_sidplay2_includes
|
|
295 builders_libdir=$xs_sidplay2_builders
|
|
296
|
|
297 dnl If libsidplay2 is in standard library search path, we need
|
|
298 dnl to get an argument whether /usr, /usr/local, etc. Else we
|
|
299 dnl can only use ${libdir}/sidplay/builders, but then are
|
|
300 dnl unable to check whether files exist as long as ${exec_prefix}
|
|
301 dnl is not defined in the configure script. So, this is a bit
|
|
302 dnl ugly, but a satisfactory fallback default for those who
|
|
303 dnl define ${prefix} and ${exec_prefix}.
|
|
304 if test -z $builders_libdir; then
|
|
305 eval "builders_libdir=$libdir/sidplay/builders"
|
|
306 fi
|
|
307
|
|
308 AC_ARG_WITH(sidbuilders,
|
|
309 [ --with-sidbuilders=DIR what the SIDPlay2 builders install PREFIX is],
|
|
310 [builders_includedir="$withval/include"
|
|
311 builders_libdir="$withval/lib/sidplay/builders"])
|
|
312
|
|
313 AC_ARG_WITH(builders-inc,
|
|
314 [ --with-builders-inc=DIR where the SIDPlay2 builders headers are located],
|
|
315 [builders_includedir="$withval"])
|
|
316
|
|
317 AC_ARG_WITH(builders-lib,
|
|
318 [ --with-builders-lib=DIR where the SIDPlay2 builders libraries are installed],
|
|
319 [builders_libdir="$withval"])
|
|
320
|
|
321 if test -n "$builders_includedir"; then
|
|
322 BUILDERS_INCLUDES="-I$builders_includedir"
|
|
323 fi
|
|
324
|
|
325 if test -n "$builders_libdir"; then
|
|
326 BUILDERS_LDFLAGS="-L$builders_libdir"
|
|
327 fi
|
|
328
|
|
329 if test -d $builders_libdir; then
|
|
330 xs_have_sidbuilders_dir=yes
|
|
331 AC_MSG_RESULT([$builders_libdir])
|
|
332 else
|
|
333 xs_have_sidbuilders_dir=no
|
|
334 AC_MSG_RESULT([$xs_have_sidbuilders_dir])
|
|
335 AC_MSG_ERROR([$builders_libdir not found!
|
|
336 Check --help on how to specify SIDPlay2 and/or builders library and
|
|
337 header path, or set --exec-prefix to the same prefix as your installation
|
|
338 of libsidplay2.
|
|
339 ])
|
|
340 fi
|
|
341
|
|
342 AC_SUBST([BUILDERS_INCLUDES])
|
|
343 AC_SUBST([BUILDERS_LDFLAGS])
|
|
344
|
|
345 AC_LANG_POP([C++])
|
|
346 ])
|
|
347
|
|
348
|
|
349 dnl -------------------------------------------------------------------------
|
|
350 dnl Test for working reSID builder.
|
|
351 dnl sets $(RESID_LDADD), substitutes @RESID_LDADD@
|
|
352 dnl -------------------------------------------------------------------------
|
|
353 AC_DEFUN([BUILDERS_FIND_RESID],
|
|
354 [
|
|
355 AC_MSG_CHECKING([for reSID builder module])
|
|
356 AC_LANG_PUSH([C++])
|
|
357 SIDPLAY_TRY_LINK_SAVE
|
|
358
|
|
359 CXX="${SHELL-/bin/sh} ${srcdir}/libtool $CXX"
|
|
360 CXXFLAGS="$CXXFLAGS $BUILDERS_INCLUDES"
|
|
361 LDFLAGS="$LDFLAGS $BUILDERS_LDFLAGS"
|
|
362 LIBS="$LIBS -lresid-builder"
|
|
363
|
|
364 AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
|
365 [[#include <sidplay/builders/resid.h>]],
|
|
366 [[ReSIDBuilder *sid;]])],
|
|
367 [builders_work=yes],
|
|
368 [builders_work=no]
|
|
369 )
|
|
370
|
|
371 SIDPLAY_TRY_LINK_RESTORE
|
|
372
|
|
373 if test "$builders_work" = yes; then
|
|
374 builders_available=yes
|
|
375 xs_builders="reSID $xs_builders"
|
|
376 AC_DEFINE([HAVE_RESID_BUILDER], [], [resid builder])
|
|
377 RESID_LDADD="-lresid-builder"
|
|
378 fi
|
|
379 AC_MSG_RESULT($builders_work)
|
|
380 AC_SUBST([RESID_LDADD])
|
|
381 AC_LANG_POP([C++])
|
|
382 ])
|
|
383
|
|
384
|
|
385 dnl -------------------------------------------------------------------------
|
|
386 dnl Test for working HardSID builder.
|
|
387 dnl sets $(HARDSID_LDADD), substitutes @HARDSID_LDADD@
|
|
388 dnl -------------------------------------------------------------------------
|
|
389 AC_DEFUN([BUILDERS_FIND_HARDSID],
|
|
390 [
|
|
391 AC_MSG_CHECKING([for HardSID builder module])
|
|
392 AC_LANG_PUSH([C++])
|
|
393 SIDPLAY_TRY_LINK_SAVE
|
|
394
|
|
395 CXX="${SHELL-/bin/sh} ${srcdir}/libtool $CXX"
|
|
396 CXXFLAGS="$CXXFLAGS $BUILDERS_INCLUDES"
|
|
397 LDFLAGS="$LDFLAGS $BUILDERS_LDFLAGS"
|
|
398 LIBS="$LIBS -lhardsid-builder"
|
|
399
|
|
400 AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
|
401 [[#include <sidplay/builders/hardsid.h>]],
|
|
402 [[HardSID *sid;]])],
|
|
403 [builders_work=yes],
|
|
404 [builders_work=no]
|
|
405 )
|
|
406
|
|
407 SIDPLAY_TRY_LINK_RESTORE
|
|
408
|
|
409 if test "$builders_work" = yes; then
|
|
410 builders_available=yes
|
|
411 xs_builders="HardSID $xs_builders"
|
|
412 AC_DEFINE([HAVE_HARDSID_BUILDER], [], [harsid builder])
|
|
413 HARDSID_LDADD="-lhardsid-builder"
|
|
414 fi
|
|
415 AC_MSG_RESULT($builders_work)
|
|
416 AC_SUBST([HARDSID_LDADD])
|
|
417 AC_LANG_POP([C++])
|
|
418 ])
|
|
419
|
|
420
|
|
421 dnl AM_PATH_SIDPLAY([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
|
422 dnl Test for SID libraries, and define SIDPLAY_CFLAGS and SIDPLAY_LIBS
|
|
423 dnl
|
|
424 AC_DEFUN([AM_PATH_SIDPLAY],
|
|
425 [
|
|
426 dnl
|
|
427 dnl Get the cflags and libraries
|
|
428 dnl
|
|
429
|
|
430 dnl ***
|
|
431 dnl *** libSIDPlay 1 options
|
|
432 dnl ***
|
|
433 AC_ARG_WITH(sidplay1,
|
|
434 [ --with-sidplay1=PREFIX Enable SIDPlay1 with install-PREFIX],
|
|
435 [
|
|
436 if test "x$withval" = xyes; then
|
|
437 xs_sidplay1=yes
|
|
438 xs_sidplay1_library=""
|
|
439 xs_sidplay1_includes=""
|
|
440 else
|
|
441 if test "x$withval" = xno; then
|
|
442 xs_sidplay1=no
|
|
443 else
|
|
444 xs_sidplay1=yes
|
|
445 xs_sidplay1_includes="$withval/include"
|
|
446 xs_sidplay1_library="$withval/lib"
|
|
447 fi
|
|
448 fi
|
|
449 ],[
|
|
450 xs_sidplay1=try
|
|
451 xs_sidplay1_library=""
|
|
452 xs_sidplay1_includes=""
|
|
453 ])
|
|
454
|
|
455 AC_ARG_WITH(sidplay1-inc,
|
|
456 [ --with-sidplay1-inc=DIR Where the SIDPlay1 headers are located],
|
|
457 [xs_sidplay1_includes="$withval"],)
|
|
458
|
|
459 AC_ARG_WITH(sidplay1-lib,
|
|
460 [ --with-sidplay1-lib=DIR Where the SIDPlay1 library is installed],
|
|
461 [xs_sidplay1_library="$withval"],)
|
|
462
|
|
463 dnl ***
|
|
464 dnl *** libSIDPlay 2 options
|
|
465 dnl ***
|
|
466 AC_ARG_WITH(sidplay2,
|
|
467 [ --with-sidplay2=PREFIX Enable SIDPlay2 with install-PREFIX],
|
|
468 [
|
|
469 if test "x$withval" = xyes; then
|
|
470 xs_sidplay2=yes
|
|
471 xs_sidplay2_library=""
|
|
472 xs_sidplay2_includes=""
|
|
473 else
|
|
474 if test "x$withval" = xno; then
|
|
475 xs_sidplay2=no
|
|
476 else
|
|
477 xs_sidplay2=yes
|
|
478 xs_sidplay2_includes="$withval/include"
|
|
479 xs_sidplay2_library="$withval/lib"
|
|
480 fi
|
|
481 fi
|
|
482 ],[
|
|
483 xs_sidplay2=try
|
|
484 xs_sidplay2_library=""
|
|
485 xs_sidplay2_includes=""
|
|
486 ])
|
|
487
|
|
488 AC_ARG_WITH(sidplay2-inc,
|
|
489 [ --with-sidplay2-inc=DIR Where the SIDPlay2 headers are located],
|
|
490 [xs_sidplay2_includes="$withval"],)
|
|
491
|
|
492
|
|
493 AC_ARG_WITH(sidplay2-lib,
|
|
494 [ --with-sidplay2-lib=DIR Where the SIDPlay2 library is installed],
|
|
495 [xs_sidplay2_library="$withval"],)
|
|
496
|
|
497 dnl ***
|
|
498 dnl *** Determine if libraries are wanted and available
|
|
499 dnl ***
|
|
500 OPT_SIDPLAY1="no"
|
|
501 if test "x$xs_sidplay1" = xtry; then
|
|
502 XS_PATH_LIBSIDPLAY1
|
|
503 else
|
|
504 if test "x$xs_sidplay1" = xyes; then
|
|
505 XS_PATH_LIBSIDPLAY1
|
|
506 if test "x$xs_have_sidplay1" = xno; then
|
|
507 AC_MSG_WARN([libSIDPlay1 library and/or headers were not found!])
|
|
508 fi
|
|
509 fi
|
|
510 fi
|
|
511 if test "x$xs_have_sidplay1" = xyes; then
|
|
512 AC_DEFINE([HAVE_SIDPLAY1],[],[sidplay1 available])
|
|
513 OPT_SIDPLAY1="yes"
|
|
514 fi
|
|
515
|
|
516 OPT_SIDPLAY2="no"
|
|
517 LIBSIDPLAY2_REQUIRED_VERSION="2.1.0"
|
|
518 if test "x$xs_sidplay2" = xtry; then
|
|
519 XS_PATH_LIBSIDPLAY2
|
|
520 else
|
|
521 if test "x$xs_sidplay2" = xyes; then
|
|
522 XS_PATH_LIBSIDPLAY2
|
|
523 if test "x$xs_have_sidplay2" = xno; then
|
|
524 AC_MSG_WARN([libSIDPlay2 library and/or headers were not found!])
|
|
525 fi
|
|
526 fi
|
|
527 fi
|
|
528 if test "x$xs_have_sidplay2" = xyes; then
|
|
529 AC_DEFINE([HAVE_SIDPLAY2],[],[sidplay2 available])
|
|
530 OPT_SIDPLAY2="yes"
|
|
531 BUILDERS_FIND
|
|
532 BUILDERS_FIND_RESID
|
|
533 BUILDERS_FIND_HARDSID
|
|
534 if test "x$builders_available" = xno; then
|
|
535 AC_MSG_WARN([No builder modules were found in the sidbuilders directory!]);
|
|
536 fi
|
|
537 fi
|
|
538
|
|
539
|
|
540 dnl ***
|
|
541 dnl *** Check if we have some emulator library available?
|
|
542 dnl ***
|
|
543 if test "x$OPT_SIDPLAY1" = xno; then
|
|
544 if test "x$OPT_SIDPLAY2" = xno; then
|
|
545 SIDPLAY_HAVESOMETHING="no"
|
|
546 fi
|
|
547 fi
|
|
548
|
|
549 if test "x$SIDPLAY_HAVESOMETHING" = xno; then
|
|
550 ifelse([$2], , :, [$2])
|
|
551 else
|
|
552 ifelse([$1], , :, [$1])
|
|
553 fi
|
|
554
|
|
555 ])
|