Mercurial > hg > xmms-sid
comparison acinclude.m4 @ 386:3cda19cf5181
Portability fixes
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 28 May 2006 12:54:04 +0000 |
parents | a66c634b222a |
children | fcf4f13d73a0 |
comparison
equal
deleted
inserted
replaced
385:7dc7e7dbbf90 | 386:3cda19cf5181 |
---|---|
128 AC_CACHE_VAL(xs_cv_have_sidplay1, | 128 AC_CACHE_VAL(xs_cv_have_sidplay1, |
129 [ | 129 [ |
130 # Run test compilation with either standard search path | 130 # Run test compilation with either standard search path |
131 # or user-defined paths. | 131 # or user-defined paths. |
132 MY_TRY_LIBSIDPLAY1 | 132 MY_TRY_LIBSIDPLAY1 |
133 if test "$xs_sidplay1_works" = yes; then | 133 if test "x$xs_sidplay1_works" = "xyes"; then |
134 xs_cv_have_sidplay1="xs_have_sidplay1=yes \ | 134 xs_cv_have_sidplay1="xs_have_sidplay1=yes \ |
135 xs_sidplay1_cxxflags=\"$xs_sidplay1_cxxflags\" \ | 135 xs_sidplay1_cxxflags=\"$xs_sidplay1_cxxflags\" \ |
136 xs_sidplay1_ldflags=\"$xs_sidplay1_ldflags\" " | 136 xs_sidplay1_ldflags=\"$xs_sidplay1_ldflags\" " |
137 else | 137 else |
138 MY_FIND_LIBSIDPLAY1 | 138 MY_FIND_LIBSIDPLAY1 |
139 fi | 139 fi |
140 ]) | 140 ]) |
141 | 141 |
142 eval "$xs_cv_have_sidplay1" | 142 eval "$xs_cv_have_sidplay1" |
143 | 143 |
144 if test "$xs_have_sidplay1" = yes; then | 144 if test "x$xs_have_sidplay1" = "xyes"; then |
145 if test -n "$xs_sidplay1_cxxflags" || test -n "$xs_sidplay1_ldflags"; then | 145 if test -n "$xs_sidplay1_cxxflags" || test -n "$xs_sidplay1_ldflags"; then |
146 AC_MSG_RESULT([$xs_sidplay1_cxxflags $xs_sidplay1_ldflags]) | 146 AC_MSG_RESULT([$xs_sidplay1_cxxflags $xs_sidplay1_ldflags]) |
147 else | 147 else |
148 AC_MSG_RESULT([yes]) | 148 AC_MSG_RESULT([yes]) |
149 fi | 149 fi |
225 fi | 225 fi |
226 | 226 |
227 # Derive sidbuilders path from libsidplay2 root. | 227 # Derive sidbuilders path from libsidplay2 root. |
228 if test -n "$xs_sidplay2_library"; then | 228 if test -n "$xs_sidplay2_library"; then |
229 xs_sidplay2_builders="$xs_sidplay2_library/sidplay/builders" | 229 xs_sidplay2_builders="$xs_sidplay2_library/sidplay/builders" |
230 elif test "$xs_pkgcfg_knows" = yes ; then | 230 elif test "x$xs_pkgcfg_knows" = "xyes" ; then |
231 xs_sidplay2_builders=`$PKG_CONFIG --variable=builders libsidplay2` | 231 xs_sidplay2_builders=`$PKG_CONFIG --variable=builders libsidplay2` |
232 fi | 232 fi |
233 | 233 |
234 AC_CACHE_VAL(xs_cv_have_sidplay2, | 234 AC_CACHE_VAL(xs_cv_have_sidplay2, |
235 [ | 235 [ |
236 # Run test compilation with either standard search path | 236 # Run test compilation with either standard search path |
237 # or user-defined paths. | 237 # or user-defined paths. |
238 xs_sidplay2_ldadd="-lsidplay2" | 238 xs_sidplay2_ldadd="-lsidplay2" |
239 MY_TRY_LIBSIDPLAY2 | 239 MY_TRY_LIBSIDPLAY2 |
240 if test "$xs_sidplay2_works" = yes; then | 240 if test "x$xs_sidplay2_works" = "xyes"; then |
241 xs_cv_have_sidplay2="xs_have_sidplay2=yes \ | 241 xs_cv_have_sidplay2="xs_have_sidplay2=yes \ |
242 xs_sidplay2_cxxflags=\"$xs_sidplay2_cxxflags\" \ | 242 xs_sidplay2_cxxflags=\"$xs_sidplay2_cxxflags\" \ |
243 xs_sidplay2_ldadd=\"$xs_sidplay2_ldadd\" \ | 243 xs_sidplay2_ldadd=\"$xs_sidplay2_ldadd\" \ |
244 xs_sidplay2_builders=\"$xs_sidplay2_builders\" " | 244 xs_sidplay2_builders=\"$xs_sidplay2_builders\" " |
245 else | 245 else |
246 MY_FIND_LIBSIDPLAY2 | 246 MY_FIND_LIBSIDPLAY2 |
247 fi | 247 fi |
248 ]) | 248 ]) |
249 eval "$xs_cv_have_sidplay2" | 249 eval "$xs_cv_have_sidplay2" |
250 if test "$xs_have_sidplay2" = yes; then | 250 if test "x$xs_have_sidplay2" = "xyes"; then |
251 if test -n "$xs_sidplay2_cxxflags" || test -n "$xs_sidplay2_ldadd"; then | 251 if test -n "$xs_sidplay2_cxxflags" || test -n "$xs_sidplay2_ldadd"; then |
252 AC_MSG_RESULT([$xs_sidplay2_cxxflags $xs_sidplay2_ldadd]) | 252 AC_MSG_RESULT([$xs_sidplay2_cxxflags $xs_sidplay2_ldadd]) |
253 else | 253 else |
254 AC_MSG_RESULT([yes]) | 254 AC_MSG_RESULT([yes]) |
255 fi | 255 fi |
269 dnl Functions used by XS_PATH_LIBSIDPLAY2. | 269 dnl Functions used by XS_PATH_LIBSIDPLAY2. |
270 AC_DEFUN([MY_FIND_LIBSIDPLAY2], | 270 AC_DEFUN([MY_FIND_LIBSIDPLAY2], |
271 [ | 271 [ |
272 # See whether user didn't provide paths. | 272 # See whether user didn't provide paths. |
273 if test -z "$xs_sidplay2_includes"; then | 273 if test -z "$xs_sidplay2_includes"; then |
274 if test "$xs_pkgcfg_knows" = yes ; then | 274 if test "x$xs_pkgcfg_knows" = "xyes" ; then |
275 xs_sidplay2_includes=`$PKG_CONFIG --variable=includedir libsidplay2` | 275 xs_sidplay2_includes=`$PKG_CONFIG --variable=includedir libsidplay2` |
276 xs_sidplay2_cxxflags=`$PKG_CONFIG --cflags libsidplay2` | 276 xs_sidplay2_cxxflags=`$PKG_CONFIG --cflags libsidplay2` |
277 else | 277 else |
278 # Search common locations where header files might be stored. | 278 # Search common locations where header files might be stored. |
279 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" | 279 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" |
282 fi | 282 fi |
283 else | 283 else |
284 xs_sidplay2_cxxflags="-I$xs_sidplay2_includes" | 284 xs_sidplay2_cxxflags="-I$xs_sidplay2_includes" |
285 fi | 285 fi |
286 if test -z "$xs_sidplay2_library"; then | 286 if test -z "$xs_sidplay2_library"; then |
287 if test "$xs_pkgcfg_knows" = yes ; then | 287 if test "x$xs_pkgcfg_knows" = "xyes" ; then |
288 xs_sidplay2_library=`$PKG_CONFIG --variable=libdir libsidplay2` | 288 xs_sidplay2_library=`$PKG_CONFIG --variable=libdir libsidplay2` |
289 xs_sidplay2_ldadd=`$PKG_CONFIG --libs libsidplay2` | 289 xs_sidplay2_ldadd=`$PKG_CONFIG --libs libsidplay2` |
290 xs_sidplay2_builders=`$PKG_CONFIG --variable=builders libsidplay2` | 290 xs_sidplay2_builders=`$PKG_CONFIG --variable=builders libsidplay2` |
291 else | 291 else |
292 # Search common locations where library might be stored. | 292 # Search common locations where library might be stored. |
384 | 384 |
385 if test -n "$builders_libdir"; then | 385 if test -n "$builders_libdir"; then |
386 BUILDERS_LDFLAGS="-L$builders_libdir" | 386 BUILDERS_LDFLAGS="-L$builders_libdir" |
387 fi | 387 fi |
388 | 388 |
389 if test -d $builders_libdir; then | 389 if test -d "$builders_libdir"; then |
390 xs_have_sidbuilders_dir=yes | 390 xs_have_sidbuilders_dir=yes |
391 AC_MSG_RESULT([$builders_libdir]) | 391 AC_MSG_RESULT([$builders_libdir]) |
392 else | 392 else |
393 xs_have_sidbuilders_dir=no | 393 xs_have_sidbuilders_dir=no |
394 AC_MSG_RESULT([$xs_have_sidbuilders_dir]) | 394 AC_MSG_RESULT([$xs_have_sidbuilders_dir]) |
428 [builders_work=no] | 428 [builders_work=no] |
429 ) | 429 ) |
430 | 430 |
431 MY_TRY_LINK_RESTORE | 431 MY_TRY_LINK_RESTORE |
432 | 432 |
433 if test "$builders_work" = yes; then | 433 if test "x$builders_work" = "xyes"; then |
434 builders_available=yes | 434 builders_available=yes |
435 xs_builders="reSID $xs_builders" | 435 xs_builders="reSID $xs_builders" |
436 AC_DEFINE(HAVE_RESID_BUILDER) | 436 AC_DEFINE(HAVE_RESID_BUILDER) |
437 RESID_LDADD="-lresid-builder" | 437 RESID_LDADD="-lresid-builder" |
438 fi | 438 fi |
464 [builders_work=no] | 464 [builders_work=no] |
465 ) | 465 ) |
466 | 466 |
467 MY_TRY_LINK_RESTORE | 467 MY_TRY_LINK_RESTORE |
468 | 468 |
469 if test "$builders_work" = yes; then | 469 if test "x$builders_work" = "xyes"; then |
470 builders_available=yes | 470 builders_available=yes |
471 xs_builders="HardSID $xs_builders" | 471 xs_builders="HardSID $xs_builders" |
472 AC_DEFINE(HAVE_HARDSID_BUILDER) | 472 AC_DEFINE(HAVE_HARDSID_BUILDER) |
473 HARDSID_LDADD="-lhardsid-builder" | 473 HARDSID_LDADD="-lhardsid-builder" |
474 fi | 474 fi |