Mercurial > hg > xmms-sid
annotate acinclude.m4 @ 1013:f3c28acd79b1
Add (void) dummies to silence compiler warnings;
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 04 Oct 2014 17:33:04 +0300 |
parents | 34259889b2b1 |
children |
rev | line source |
---|---|
988 | 1 dnl *** |
2 dnl *** These m4-macros were originally based on XSIDPLAY v1.6.5's acinclude.m4 | |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
3 dnl *** (C) Copyright 2002 Michael Schwendt, licensed under GNU GPL v2. |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
4 dnl *** |
681 | 5 dnl *** Updated for new autotools, plus namespace, added portability |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
6 dnl *** fixes and other minor changes by Matti 'ccr' Hamalainen |
988 | 7 dnl *** (C) Copyright 2003-2013 Tecnic Software productions (TNSP) |
8 dnl *** | |
933
6820177eb6da
Properly check for things like off_t and size_t and few libc functions, just to
Matti Hamalainen <ccr@tnsp.org>
parents:
861
diff
changeset
|
9 AC_DEFUN([XS_CHECK_FEATURE], |
6820177eb6da
Properly check for things like off_t and size_t and few libc functions, just to
Matti Hamalainen <ccr@tnsp.org>
parents:
861
diff
changeset
|
10 [ |
6820177eb6da
Properly check for things like off_t and size_t and few libc functions, just to
Matti Hamalainen <ccr@tnsp.org>
parents:
861
diff
changeset
|
11 if test "x[]$$1" != "xyes"; then |
6820177eb6da
Properly check for things like off_t and size_t and few libc functions, just to
Matti Hamalainen <ccr@tnsp.org>
parents:
861
diff
changeset
|
12 AC_MSG_ERROR([Required feature $2 not detected. See config.log for more information.]) |
6820177eb6da
Properly check for things like off_t and size_t and few libc functions, just to
Matti Hamalainen <ccr@tnsp.org>
parents:
861
diff
changeset
|
13 fi |
6820177eb6da
Properly check for things like off_t and size_t and few libc functions, just to
Matti Hamalainen <ccr@tnsp.org>
parents:
861
diff
changeset
|
14 ]) |
6820177eb6da
Properly check for things like off_t and size_t and few libc functions, just to
Matti Hamalainen <ccr@tnsp.org>
parents:
861
diff
changeset
|
15 |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
16 |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
17 AC_DEFUN([XS_FIND_FILE], |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
18 [ |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
19 $3="" |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
20 for i in $2; do |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
21 for j in $1; do |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
22 if test -r "$i/$j"; then |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
23 $3="$i" |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
24 break 2 |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
25 fi |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
26 done |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
27 done |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
28 ]) |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
29 |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
30 |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
31 AC_DEFUN([XS_TRY_LIBRARY], |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
32 [ |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
33 AC_LANG_ASSERT([C++]) |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
34 m4_ifvaln([$2], [xs_cxxflags_save="$CXXFLAGS" |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
35 CXXFLAGS="$CXXFLAGS $2"])dnl |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
36 m4_ifvaln([$3], [xs_ldflags_save="$LDFLAGS" |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
37 LDFLAGS="$LDFLAGS $3"])dnl |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
38 m4_ifvaln([$4], [xs_libs_save="$LIBS" |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
39 LIBS="$LIBS -l$4"])dnl |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
40 AC_LINK_IFELSE( |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
41 [ |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
42 AC_LANG_PROGRAM( |
838
ae1f6418d093
libSIDPlay2-FP backend interface is now in a separate module. Configuration
Matti Hamalainen <ccr@tnsp.org>
parents:
800
diff
changeset
|
43 [ |
ae1f6418d093
libSIDPlay2-FP backend interface is now in a separate module. Configuration
Matti Hamalainen <ccr@tnsp.org>
parents:
800
diff
changeset
|
44 #include <stdio.h> |
ae1f6418d093
libSIDPlay2-FP backend interface is now in a separate module. Configuration
Matti Hamalainen <ccr@tnsp.org>
parents:
800
diff
changeset
|
45 #include <$5> |
ae1f6418d093
libSIDPlay2-FP backend interface is now in a separate module. Configuration
Matti Hamalainen <ccr@tnsp.org>
parents:
800
diff
changeset
|
46 ], |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
47 [$6] |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
48 )], |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
49 [xs_$1_works="yes"], |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
50 [xs_$1_works="no"] |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
51 ) |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
52 m4_ifvaln([$2], [CXXFLAGS="$xs_cxxflags_save"])dnl |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
53 m4_ifvaln([$3], [LDFLAGS="$xs_ldflags_save"])dnl |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
54 m4_ifvaln([$4], [LIBS="$xs_libs_save"])dnl |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
55 ]) |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
56 |
125
532ec0ad5e59
Added support/detection for libNanoSID.
Matti Hamalainen <ccr@tnsp.org>
parents:
90
diff
changeset
|
57 |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
58 AC_DEFUN([XS_ARG_WITH], [dnl |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
59 define([Name], [translit([$1], [a-z], [A-Z])])dnl |
707 | 60 define([roflCopter], [Enable $2 with install-PREFIX])dnl |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
61 AH_TEMPLATE(HAVE_[]Name, [Define if you have and want to use $2])dnl |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
62 AC_ARG_WITH([$1], |
707 | 63 [AS_HELP_STRING([--with-$1=PREFIX], roflCopter)], [dnl |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
64 if test "x$withval" = "xyes"; then |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
65 xs_use_$1="yes" |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
66 xs_$1_library="" |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
67 xs_$1_includes="" |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
68 else |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
69 if test "x$withval" = "xno"; then |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
70 xs_use_$1="no" |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
71 else |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
72 xs_use_$1="yes" |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
73 xs_$1_includes="$withval/include" |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
74 xs_$1_library="$withval/lib" |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
75 fi |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
76 fi |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
77 ],[dnl |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
78 xs_use_$1="try" |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
79 xs_$1_library="" |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
80 xs_$1_includes="" |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
81 ])dnl |
707 | 82 define([roflCopter], [Where the $2 headers are located])dnl |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
83 AC_ARG_WITH([$1-inc], |
707 | 84 [AS_HELP_STRING([--with-$1-inc=DIR], roflCopter)], |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
85 [xs_$1_includes="$withval"])dnl |
707 | 86 define([roflCopter], [Where the $2 library is installed])dnl |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
87 AC_ARG_WITH([$1-lib], |
707 | 88 [AS_HELP_STRING([--with-$1-lib=DIR], roflCopter)], |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
89 [xs_$1_library="$withval"])dnl |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
90 |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
91 dnl Okay, handle this |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
92 xs_have_$1="no" |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
93 if test "x$xs_use_$1" = "xtry"; then |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
94 $3 |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
95 elif test "x$xs_use_$1" = "xyes"; then |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
96 $3 |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
97 if test "x$xs_have_$1" = "xno"; then |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
98 AC_MSG_ERROR([$2 library and/or headers were not found!]) |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
99 fi |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
100 fi |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
101 ]) |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
102 |
125
532ec0ad5e59
Added support/detection for libNanoSID.
Matti Hamalainen <ccr@tnsp.org>
parents:
90
diff
changeset
|
103 |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
104 dnl ------------------------------------------------------------------------- |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
105 dnl Try to find SIDPLAY library and header files. |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
106 dnl $xs_have_sidplay1 will be "yes" or "no" |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
107 dnl @SIDPLAY1_LIBS@ will be substituted with linker parameters |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
108 dnl @SIDPLAY1_INCLUDES@ will be substituted with compiler parameters |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
109 dnl ------------------------------------------------------------------------- |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
110 |
248
a66c634b222a
Macro quotation cleanup to satisfy Automake 1.8 and friends.
Matti Hamalainen <ccr@tnsp.org>
parents:
200
diff
changeset
|
111 AC_DEFUN([XS_PATH_LIBSIDPLAY1], |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
112 [ |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
113 AC_MSG_CHECKING([for working SIDPlay1 library and headers]) |
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
114 |
248
a66c634b222a
Macro quotation cleanup to satisfy Automake 1.8 and friends.
Matti Hamalainen <ccr@tnsp.org>
parents:
200
diff
changeset
|
115 AC_LANG_PUSH([C++]) |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
116 |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
117 dnl Use include path given by user (if any). |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
118 if test "x$xs_sidplay1_includes" != "x"; then |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
119 xs_sidplay1_cxxflags="-I$xs_sidplay1_includes" |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
120 else |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
121 xs_sidplay1_cxxflags="" |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
122 fi |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
123 |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
124 dnl Use library path given by user (if any). |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
125 if test "x$xs_sidplay1_library" != "x"; then |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
126 xs_sidplay1_ldflags="-L$xs_sidplay1_library" |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
127 else |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
128 xs_sidplay1_ldflags="" |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
129 fi |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
130 |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
131 AC_CACHE_VAL([xs_cv_have_sidplay1], |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
132 [ |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
133 dnl Run test compilation with either standard search path |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
134 dnl or user-defined paths. |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
135 XS_TRY_LIBSIDPLAY1 |
386 | 136 if test "x$xs_sidplay1_works" = "xyes"; then |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
137 xs_cv_have_sidplay1="xs_have_sidplay1=yes \ |
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
138 xs_sidplay1_cxxflags=\"$xs_sidplay1_cxxflags\" \ |
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
139 xs_sidplay1_ldflags=\"$xs_sidplay1_ldflags\" " |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
140 else |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
141 XS_FIND_LIBSIDPLAY1 |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
142 fi |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
143 ]) |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
144 eval "$xs_cv_have_sidplay1" |
744
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
145 |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
146 if test "x$xs_have_sidplay1" = "xyes"; then |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
147 if test "x$xs_sidplay1_cxxflags" != "x" || test "x$xs_sidplay1_ldflags" != "x"; then |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
148 AC_MSG_RESULT([$xs_sidplay1_cxxflags $xs_sidplay1_ldflags -lsidplay]) |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
149 else |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
150 AC_MSG_RESULT([yes]) |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
151 fi |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
152 |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
153 SIDPLAY1_LIBS="$xs_sidplay1_ldflags -lsidplay" |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
154 SIDPLAY1_CFLAGS="$xs_sidplay1_cxxflags" |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
155 AC_SUBST([SIDPLAY1_LIBS])dnl |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
156 AC_SUBST([SIDPLAY1_CFLAGS])dnl |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
157 else |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
158 AC_MSG_RESULT([no]) |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
159 fi |
248
a66c634b222a
Macro quotation cleanup to satisfy Automake 1.8 and friends.
Matti Hamalainen <ccr@tnsp.org>
parents:
200
diff
changeset
|
160 AC_LANG_POP([C++]) |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
161 ]) |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
162 |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
163 dnl Functions used by XS_PATH_LIBSIDPLAY1. |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
164 |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
165 AC_DEFUN([XS_FIND_LIBSIDPLAY1], |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
166 [ |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
167 dnl Search common locations where header files might be stored. |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
168 XS_FIND_FILE([xs_sidplay1_includes], [sidplay/sidtune.h], |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
169 [$xs_sidplay1_includes /usr/include /usr/local/include /usr/lib/sidplay/include /usr/local/lib/sidplay/include /opt/sfw/include /opt/csw/include]) |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
170 |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
171 dnl Search common locations where library might be stored. |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
172 XS_FIND_FILE([xs_sidplay1_library], |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
173 [libsidplay.a libsidplay.so libsidplay.so.1 libsidplay.so.1.36 libsidplay.so.1.37], |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
174 [$xs_sidplay1_library /usr/lib /usr/lib/sidplay /usr/local/lib/sidplay /opt/sfw/lib /opt/csw/lib]) |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
175 |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
176 if test "x$xs_sidplay1_includes" = "x" || test "x$xs_sidplay1_library" = "x"; then |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
177 xs_cv_have_sidplay1="xs_have_sidplay1=no \ |
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
178 xs_sidplay1_ldflags=\"\" xs_sidplay1_cxxflags=\"\" " |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
179 else |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
180 dnl Test compilation with found paths. |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
181 xs_sidplay1_ldflags="-L$xs_sidplay1_library" |
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
182 xs_sidplay1_cxxflags="-I$xs_sidplay1_includes" |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
183 XS_TRY_LIBSIDPLAY1 |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
184 xs_cv_have_sidplay1="xs_have_sidplay1=$xs_sidplay1_works \ |
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
185 xs_sidplay1_ldflags=\"$xs_sidplay1_ldflags\" \ |
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
186 xs_sidplay1_cxxflags=\"$xs_sidplay1_cxxflags\" " |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
187 fi |
1 | 188 ]) |
189 | |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
190 AC_DEFUN([XS_TRY_LIBSIDPLAY1],[ |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
191 XS_TRY_LIBRARY([sidplay1], [$xs_sidplay1_cxxflags], [$xs_sidplay1_ldflags], |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
192 [sidplay], [sidplay/sidtune.h], [sidTune* myTest = new sidTune(0);]) |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
193 ]) |
1 | 194 |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
195 |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
196 dnl ------------------------------------------------------------------------- |
991
34259889b2b1
Add support for libSIDPlay-FP v1.1.x.
Matti Hamalainen <ccr@tnsp.org>
parents:
988
diff
changeset
|
197 dnl Try to find SIDPLAY-FP library and header files. |
34259889b2b1
Add support for libSIDPlay-FP v1.1.x.
Matti Hamalainen <ccr@tnsp.org>
parents:
988
diff
changeset
|
198 dnl $xs_have_sidplayfp will be "yes" or "no" |
34259889b2b1
Add support for libSIDPlay-FP v1.1.x.
Matti Hamalainen <ccr@tnsp.org>
parents:
988
diff
changeset
|
199 dnl @SIDPLAYFP_LIBS@ will be substituted with linker parameters |
34259889b2b1
Add support for libSIDPlay-FP v1.1.x.
Matti Hamalainen <ccr@tnsp.org>
parents:
988
diff
changeset
|
200 dnl @SIDPLAYFP_INCLUDES@ will be substituted with compiler parameters |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
201 dnl ------------------------------------------------------------------------- |
800
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
202 |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
203 AC_DEFUN([XS_PATH_LIBSIDPLAYFP], |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
204 [ |
800
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
205 AC_MSG_CHECKING([for working SIDPlayFP library and headers]) |
1 | 206 |
248
a66c634b222a
Macro quotation cleanup to satisfy Automake 1.8 and friends.
Matti Hamalainen <ccr@tnsp.org>
parents:
200
diff
changeset
|
207 AC_LANG_PUSH([C++]) |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
208 |
861
c6cf203be443
Downgrade libSIDPlayFP version requirement from 0.3.7 to 0.3.5 (available in Debian Wheezy)
Matti Hamalainen <ccr@tnsp.org>
parents:
838
diff
changeset
|
209 PKG_CHECK_EXISTS([libsidplayfp >= 0.3.5], [xs_pkg_sidplayfp="yes"], []) |
991
34259889b2b1
Add support for libSIDPlay-FP v1.1.x.
Matti Hamalainen <ccr@tnsp.org>
parents:
988
diff
changeset
|
210 PKG_CHECK_EXISTS([libsidplayfp >= 1.0.0], [xs_pkg_sidplayfp_v10="yes"], []) |
34259889b2b1
Add support for libSIDPlay-FP v1.1.x.
Matti Hamalainen <ccr@tnsp.org>
parents:
988
diff
changeset
|
211 PKG_CHECK_EXISTS([libsidplayfp >= 1.1.0], [xs_pkg_sidplayfp_v11="yes"], []) |
744
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
212 |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
213 if test "x$xs_pkg_sidplayfp" = "xyes"; then |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
214 AC_CACHE_VAL([xs_cv_have_sidplayfp], |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
215 [ |
800
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
216 xs_sidplayfp_cflags=`$PKG_CONFIG --libs libsidplayfp` |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
217 xs_sidplayfp_ldflags=`$PKG_CONFIG --libs libsidplayfp` |
744
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
218 |
991
34259889b2b1
Add support for libSIDPlay-FP v1.1.x.
Matti Hamalainen <ccr@tnsp.org>
parents:
988
diff
changeset
|
219 if test "x$xs_pkg_sidplayfp_v10" = "xyes"; then |
838
ae1f6418d093
libSIDPlay2-FP backend interface is now in a separate module. Configuration
Matti Hamalainen <ccr@tnsp.org>
parents:
800
diff
changeset
|
220 XS_TRY_LIBRARY([sidplayfp], |
ae1f6418d093
libSIDPlay2-FP backend interface is now in a separate module. Configuration
Matti Hamalainen <ccr@tnsp.org>
parents:
800
diff
changeset
|
221 [$xs_sidplayfp_cxxflags -DHAVE_UNIX], [$xs_sidplayfp_ldflags], |
ae1f6418d093
libSIDPlay2-FP backend interface is now in a separate module. Configuration
Matti Hamalainen <ccr@tnsp.org>
parents:
800
diff
changeset
|
222 [sidplayfp], [sidplayfp/sidplayfp.h], [sidplayfp *myEngine;]) |
ae1f6418d093
libSIDPlay2-FP backend interface is now in a separate module. Configuration
Matti Hamalainen <ccr@tnsp.org>
parents:
800
diff
changeset
|
223 else |
ae1f6418d093
libSIDPlay2-FP backend interface is now in a separate module. Configuration
Matti Hamalainen <ccr@tnsp.org>
parents:
800
diff
changeset
|
224 XS_TRY_LIBRARY([sidplayfp], |
ae1f6418d093
libSIDPlay2-FP backend interface is now in a separate module. Configuration
Matti Hamalainen <ccr@tnsp.org>
parents:
800
diff
changeset
|
225 [$xs_sidplayfp_cxxflags -DHAVE_UNIX], [$xs_sidplayfp_ldflags], |
ae1f6418d093
libSIDPlay2-FP backend interface is now in a separate module. Configuration
Matti Hamalainen <ccr@tnsp.org>
parents:
800
diff
changeset
|
226 [sidplayfp], [sidplayfp/sidplay2.h], [sidplay2 *myEngine;]) |
ae1f6418d093
libSIDPlay2-FP backend interface is now in a separate module. Configuration
Matti Hamalainen <ccr@tnsp.org>
parents:
800
diff
changeset
|
227 fi |
744
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
228 |
800
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
229 if test "x$xs_sidplayfp_works" = "xyes"; then |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
230 xs_cv_have_sidplayfp="xs_have_sidplayfp=yes \ |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
231 xs_sidplayfp_cxxflags=\"$xs_sidplayfp_cxxflags\" \ |
838
ae1f6418d093
libSIDPlay2-FP backend interface is now in a separate module. Configuration
Matti Hamalainen <ccr@tnsp.org>
parents:
800
diff
changeset
|
232 xs_sidplayfp_ldflags=\"$xs_sidplayfp_ldflags\" \ |
991
34259889b2b1
Add support for libSIDPlay-FP v1.1.x.
Matti Hamalainen <ccr@tnsp.org>
parents:
988
diff
changeset
|
233 xs_pkg_sidplayfp_v10=\"$xs_pkg_sidplayfp_v10\" \ |
34259889b2b1
Add support for libSIDPlay-FP v1.1.x.
Matti Hamalainen <ccr@tnsp.org>
parents:
988
diff
changeset
|
234 xs_pkg_sidplayfp_v11=\"$xs_pkg_sidplayfp_v11\" " |
744
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
235 fi |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
236 ]) |
800
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
237 fi |
744
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
238 |
800
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
239 eval "$xs_cv_have_sidplayfp" |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
240 |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
241 if test "x$xs_have_sidplayfp" = "xyes"; then |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
242 if test "x$xs_sidplayfp_cxxflags" != "x" || test "x$xs_sidplayfp_ldflags" != "x"; then |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
243 AC_MSG_RESULT([$xs_sidplayfp_cxxflags $xs_sidplayfp_ldflags]) |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
244 else |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
245 AC_MSG_RESULT([yes]) |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
246 fi |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
247 |
838
ae1f6418d093
libSIDPlay2-FP backend interface is now in a separate module. Configuration
Matti Hamalainen <ccr@tnsp.org>
parents:
800
diff
changeset
|
248 SIDPLAYFP_LIBS="$xs_sidplayfp_ldflags" |
ae1f6418d093
libSIDPlay2-FP backend interface is now in a separate module. Configuration
Matti Hamalainen <ccr@tnsp.org>
parents:
800
diff
changeset
|
249 SIDPLAYFP_CFLAGS="$xs_sidplayfp_cxxflags" |
ae1f6418d093
libSIDPlay2-FP backend interface is now in a separate module. Configuration
Matti Hamalainen <ccr@tnsp.org>
parents:
800
diff
changeset
|
250 AC_SUBST([SIDPLAYFP_LIBS])dnl |
ae1f6418d093
libSIDPlay2-FP backend interface is now in a separate module. Configuration
Matti Hamalainen <ccr@tnsp.org>
parents:
800
diff
changeset
|
251 AC_SUBST([SIDPLAYFP_CFLAGS])dnl |
800
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
252 else |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
253 AC_MSG_RESULT([no]) |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
254 fi |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
255 |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
256 AC_LANG_POP([C++]) |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
257 ]) |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
258 |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
259 |
991
34259889b2b1
Add support for libSIDPlay-FP v1.1.x.
Matti Hamalainen <ccr@tnsp.org>
parents:
988
diff
changeset
|
260 dnl ------------------------------------------------------------------------- |
34259889b2b1
Add support for libSIDPlay-FP v1.1.x.
Matti Hamalainen <ccr@tnsp.org>
parents:
988
diff
changeset
|
261 dnl Try to find SIDPLAY2 library and header files. |
34259889b2b1
Add support for libSIDPlay-FP v1.1.x.
Matti Hamalainen <ccr@tnsp.org>
parents:
988
diff
changeset
|
262 dnl $xs_have_sidplay2 will be "yes" or "no" |
34259889b2b1
Add support for libSIDPlay-FP v1.1.x.
Matti Hamalainen <ccr@tnsp.org>
parents:
988
diff
changeset
|
263 dnl @SIDPLAY2_LIBS@ will be substituted with linker parameters |
34259889b2b1
Add support for libSIDPlay-FP v1.1.x.
Matti Hamalainen <ccr@tnsp.org>
parents:
988
diff
changeset
|
264 dnl @SIDPLAY2_INCLUDES@ will be substituted with compiler parameters |
34259889b2b1
Add support for libSIDPlay-FP v1.1.x.
Matti Hamalainen <ccr@tnsp.org>
parents:
988
diff
changeset
|
265 dnl ------------------------------------------------------------------------- |
800
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
266 |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
267 AC_DEFUN([XS_PATH_LIBSIDPLAY2], |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
268 [ |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
269 AC_MSG_CHECKING([for working SIDPlay2 library and headers]) |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
270 |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
271 AC_LANG_PUSH([C++]) |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
272 |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
273 PKG_CHECK_EXISTS([libsidplay2 >= 2.1.1], [xs_pkg_sidplay2="yes"], []) |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
274 |
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
275 if test "x$xs_pkg_sidplay2" = "xyes"; then |
744
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
276 AC_CACHE_VAL([xs_cv_have_sidplay2], |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
277 [ |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
278 xs_sidplay2_cflags=`$PKG_CONFIG --libs libsidplay2` |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
279 xs_sidplay2_ldflags=`$PKG_CONFIG --libs libsidplay2` |
1 | 280 |
744
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
281 dnl Derive sidbuilders path from libsidplay2 root. |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
282 if test "x$xs_sidplay2_library" != "x"; then |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
283 xs_sidplay2_builders="$xs_sidplay2_library/sidplay/builders" |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
284 else |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
285 xs_sidplay2_builders=`$PKG_CONFIG --variable=builders libsidplay2` |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
286 fi |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
287 |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
288 dnl *** Check for new COMI API |
795
3e305ce076e8
Make old libSIDPlay2 support work again, the one available in most distros, such as Debian.
Matti Hamalainen <ccr@tnsp.org>
parents:
744
diff
changeset
|
289 xs_api_ok="yes" |
744
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
290 AC_MSG_CHECKING([libSIDPlay2 API compatibility]) |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
291 tmp_CPPFLAGS="$CPPFLAGS" |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
292 if test -d "$xs_sidplay2_includes"; then |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
293 CPPFLAGS="$CPPFLAGS -I${xs_sidplay2_includes}" |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
294 fi |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
295 AC_EGREP_HEADER([::Iid], [sidplay/sidplay2.h], |
795
3e305ce076e8
Make old libSIDPlay2 support work again, the one available in most distros, such as Debian.
Matti Hamalainen <ccr@tnsp.org>
parents:
744
diff
changeset
|
296 [xs_api_ok="no"], [ |
744
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
297 AC_EGREP_HEADER([SIDIID], [sidplay/sidplay2.h], [ |
795
3e305ce076e8
Make old libSIDPlay2 support work again, the one available in most distros, such as Debian.
Matti Hamalainen <ccr@tnsp.org>
parents:
744
diff
changeset
|
298 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sidplay/sidunknown.h>], [ISidUnknown *i;])], [xs_api_ok="no"], [])]) |
744
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
299 ]) |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
300 |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
301 if test "x$xs_api_ok" = "xyes"; then |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
302 XS_TRY_LIBRARY([sidplay2], |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
303 [$xs_sidplay2_cxxflags -DHAVE_UNIX], [$xs_sidplay2_ldflags], |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
304 [sidplay2], [sidplay/sidplay2.h], [sidplay2 *myEngine;]) |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
305 fi |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
306 |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
307 if test "x$xs_sidplay2_works" = "xyes"; then |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
308 xs_cv_have_sidplay2="xs_have_sidplay2=yes \ |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
309 xs_sidplay2_cxxflags=\"$xs_sidplay2_cxxflags\" \ |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
310 xs_sidplay2_ldflags=\"$xs_sidplay2_ldflags\" \ |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
311 xs_sidplay2_builders=\"$xs_sidplay2_builders\" " |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
312 fi |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
313 ]) |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
314 fi |
1 | 315 |
744
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
316 eval "$xs_cv_have_sidplay2" |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
317 |
800
1fe6005ed58c
Make it so that both libSIDPlay2 and libSIDPlay-FP can co-exist, though not
Matti Hamalainen <ccr@tnsp.org>
parents:
795
diff
changeset
|
318 if test "x$xs_have_sidplay2" = "xyes"; then |
744
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
319 if test "x$xs_sidplay2_cxxflags" != "x" || test "x$xs_sidplay2_ldflags" != "x"; then |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
320 AC_MSG_RESULT([$xs_sidplay2_cxxflags $xs_sidplay2_ldflags]) |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
321 else |
744
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
322 AC_MSG_RESULT([yes]) |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
323 fi |
1 | 324 |
744
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
325 SIDPLAY2_LIBS="$xs_sidplay2_ldflags" |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
326 SIDPLAY2_CFLAGS="$xs_sidplay2_cxxflags" |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
327 AC_SUBST([SIDPLAY2_LIBS])dnl |
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
328 AC_SUBST([SIDPLAY2_CFLAGS])dnl |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
329 else |
744
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
330 AC_MSG_RESULT([no]) |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
331 fi |
1 | 332 |
744
c7fa50576c70
Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as
Matti Hamalainen <ccr@tnsp.org>
parents:
736
diff
changeset
|
333 AC_LANG_POP([C++]) |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
334 ]) |
1 | 335 |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
336 |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
337 dnl ------------------------------------------------------------------------- |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
338 dnl Find libsidplay2 builders (sidbuilders) dir. |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
339 dnl @BUILDERS_CFLAGS@ |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
340 dnl @BUILDERS_LDFLAGS@ |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
341 dnl ------------------------------------------------------------------------- |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
342 AC_DEFUN([XS_BUILDERS_CHECK], |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
343 [ |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
344 AC_MSG_CHECKING([for SIDPlay2 builders directory]) |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
345 AC_LANG_ASSERT([C++]) |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
346 AC_REQUIRE([XS_PATH_LIBSIDPLAY2]) |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
347 |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
348 dnl Sidbuilder headers are included with "builders" prefix. |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
349 builders_includedir="$xs_sidplay2_includes" |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
350 builders_libdir="$xs_sidplay2_builders" |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
351 |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
352 dnl If libsidplay2 is in standard library search path, we need |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
353 dnl to get an argument whether /usr, /usr/local, etc. Else we |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
354 dnl can only use ${libdir}/sidplay/builders, but then are |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
355 dnl unable to check whether files exist as long as ${exec_prefix} |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
356 dnl is not defined in the configure script. So, this is a bit |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
357 dnl ugly, but a satisfactory fallback default for those who |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
358 dnl define ${prefix} and ${exec_prefix}. |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
359 if test "x$builders_libdir" = "x"; then |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
360 eval "builders_libdir=$libdir/sidplay/builders" |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
361 fi |
1 | 362 |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
363 AC_ARG_WITH([sidbuilders], |
707 | 364 [AS_HELP_STRING([--with-sidbuilders=DIR], [What the SIDPlay2 builders install PREFIX is])], |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
365 [builders_includedir="$withval/include" |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
366 builders_libdir="$withval/lib/sidplay/builders"]) |
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
367 |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
368 AC_ARG_WITH([builders-inc], |
707 | 369 [AS_HELP_STRING([--with-builders-inc=DIR], [Where the SIDPlay2 builders headers are located])], |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
370 [builders_includedir="$withval"]) |
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
371 |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
372 AC_ARG_WITH([builders-lib], |
707 | 373 [AS_HELP_STRING([--with-builders-lib=DIR], [Where the SIDPlay2 builders libraries are installed])], |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
374 [builders_libdir="$withval"]) |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
375 |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
376 if test "x$builders_includedir" != "x"; then |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
377 BUILDERS_CFLAGS="-I$builders_includedir" |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
378 fi |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
379 |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
380 if test "x$builders_libdir" != "x"; then |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
381 BUILDERS_LDFLAGS="-L$builders_libdir" |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
382 fi |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
383 |
386 | 384 if test -d "$builders_libdir"; then |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
385 xs_have_sidbuilders_dir="yes" |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
386 AC_MSG_RESULT([$builders_libdir]) |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
387 else |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
388 xs_have_sidbuilders_dir="no" |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
389 AC_MSG_RESULT([$xs_have_sidbuilders_dir]) |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
390 AC_MSG_ERROR([$builders_libdir not found! |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
391 Check --help on how to specify SIDPlay2 and/or builders library and |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
392 header path, or set --exec-prefix to the same prefix as your installation |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
393 of libsidplay2. |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
394 ]) |
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
395 fi |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
396 |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
397 AC_SUBST([BUILDERS_CFLAGS]) |
248
a66c634b222a
Macro quotation cleanup to satisfy Automake 1.8 and friends.
Matti Hamalainen <ccr@tnsp.org>
parents:
200
diff
changeset
|
398 AC_SUBST([BUILDERS_LDFLAGS]) |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
399 ]) |
1 | 400 |
31
ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
401 |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
402 dnl ------------------------------------------------------------------------- |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
403 dnl Test for working builders |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
404 dnl ------------------------------------------------------------------------- |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
405 AC_DEFUN([XS_BUILDERS_FIND], [dnl |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
406 define([Name], [translit([$1], [a-z], [A-Z])])dnl |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
407 AH_TEMPLATE(HAVE_[]Name[]_BUILDER, [Define if you have $1 for libSIDPlay 2]) |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
408 AC_MSG_CHECKING([for $1 builder module]) |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
409 XS_TRY_LIBRARY([builders], [$BUILDERS_CFLAGS], [$BUILDERS_LDFLAGS], |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
410 [$2], [sidplay/builders/$3], [$4 *sid;]) |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
411 if test "x$xs_builders_works" = "xyes"; then |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
412 xs_builders_available="yes" |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
413 xs_builders="$1 $xs_builders" |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
414 AC_DEFINE(HAVE_[]Name[]_BUILDER) |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
415 BUILDERS_LIBS="$BUILDERS_LIBS -l$2" |
30
fde5167bb736
Updated to have macros for detecting libSIDPlay 1 and 2
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
416 fi |
676
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
417 AC_MSG_RESULT([$xs_builders_works]) |
60782f6c2bc8
Cleaned up the libSIDPlay-related Autoconf test m4 macros.
Matti Hamalainen <ccr@tnsp.org>
parents:
407
diff
changeset
|
418 AC_SUBST([BUILDERS_LIBS]) |
1 | 419 ]) |