Mercurial > hg > xmms-sid
comparison configure.in @ 31:ca6dab6c4ead
Re-wrote configuration scripts and libsidplay 1/2 detection.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 08 Jun 2003 03:03:01 +0000 |
parents | 469efc05e01e |
children | 13db37492b6d |
comparison
equal
deleted
inserted
replaced
30:fde5167bb736 | 31:ca6dab6c4ead |
---|---|
4 | 4 |
5 dnl Require autoconf 2.54 or later | 5 dnl Require autoconf 2.54 or later |
6 AC_PREREQ(2.54) | 6 AC_PREREQ(2.54) |
7 | 7 |
8 dnl Initialize | 8 dnl Initialize |
9 AC_INIT(XMMS-SID, 0.8.0rc1, ccr@tnsp.org) | 9 AC_INIT(XMMS-SID, 0.8.0beta1, ccr@tnsp.org) |
10 AC_COPYRIGHT([[(C) 2002 Michael Schwendt, Matti 'ccr' Hämäläinen]]) | 10 AC_COPYRIGHT([[(C) 2002-2003 Matti 'ccr' Hämäläinen]]) |
11 AC_CONFIG_SRCDIR(src/xmms-sid.h) | 11 AC_CONFIG_SRCDIR(src/xmms-sid.h) |
12 AM_INIT_AUTOMAKE | 12 AM_INIT_AUTOMAKE |
13 AC_CONFIG_HEADERS(config.h) | 13 AC_CONFIG_HEADERS(config.h) |
14 | 14 |
15 | 15 |
28 AC_PROG_CXX | 28 AC_PROG_CXX |
29 dnl AC_PROG_CPP | 29 dnl AC_PROG_CPP |
30 AC_PROG_INSTALL | 30 AC_PROG_INSTALL |
31 AC_HEADER_STDC | 31 AC_HEADER_STDC |
32 | 32 |
33 | 33 AC_PREFIX_PROGRAM(xmms) |
34 dnl *** | 34 |
35 dnl *** Checks for libraries | 35 dnl *** |
36 dnl *** | 36 dnl *** Checks for generic libraries |
37 AC_PATH_LIBSIDPLAY | 37 dnl *** |
38 dnl AC_PATH_LIBSIDPLAY2 | 38 AM_PATH_GLIB(1.2.8,,AC_MSG_ERROR([*** GLib >= 1.2.8 not found. You either don't have GLib at all or your GLib is too old. Latest GLib can be found from Gtk+ homepages (http://www.gtk.org/)])) |
39 | |
40 AM_PATH_GLIB(1.2.8,,AC_MSG_ERROR([*** GLIB >= 1.2.8 not found. You either don't have GLIB at all or your GLIB is too old. Latest GLIB can be found from Gtk+ homepages (http://www.gtk.org/)])) | |
41 | 39 |
42 AM_PATH_GTK(1.2.8,,AC_MSG_ERROR([*** Gtk+ >= 1.2.8 not found. You either don't have Gtk+ at all or your Gtk+ is too old. Latest Gtk+ can be found from Gtk+ homepages (http://www.gtk.org/)]), gthread) | 40 AM_PATH_GTK(1.2.8,,AC_MSG_ERROR([*** Gtk+ >= 1.2.8 not found. You either don't have Gtk+ at all or your Gtk+ is too old. Latest Gtk+ can be found from Gtk+ homepages (http://www.gtk.org/)]), gthread) |
41 | |
42 | |
43 dnl *** | |
44 dnl *** libSIDPlay 1 options | |
45 dnl *** | |
46 AC_ARG_WITH(libsidplay1, | |
47 [ --with-libsidplay1=PREFIX Enable SIDPlay1 with install-PREFIX is], | |
48 [ | |
49 if test "$withval" = yes; then | |
50 xs_sidplay1=yes | |
51 xs_sidplay1_library="" | |
52 xs_sidplay1_includes="" | |
53 else | |
54 if test "$withval" = no; then | |
55 xs_sidplay1=no | |
56 else | |
57 xs_sidplay1=yes | |
58 xs_sidplay1_includes="$withval/include" | |
59 xs_sidplay1_library="$withval/lib" | |
60 fi | |
61 fi | |
62 ],[ | |
63 xs_sidplay1=yes | |
64 xs_sidplay1_library="" | |
65 xs_sidplay1_includes="" | |
66 ]) | |
67 | |
68 AC_ARG_WITH(sidplay1-inc, | |
69 [ --with-sidplay1-inc=DIR Where the SIDPlay1 headers are located], | |
70 [xs_sidplay1_includes="$withval"],) | |
71 | |
72 AC_ARG_WITH(sidplay1-lib, | |
73 [ --with-sidplay1-lib=DIR Where the SIDPlay1 library is installed], | |
74 [xs_sidplay1_library="$withval"],) | |
75 | |
76 | |
77 dnl *** | |
78 dnl *** libSIDPlay 2 options | |
79 dnl *** | |
80 AC_ARG_WITH(libsidplay2, | |
81 [ --with-libsidplay2=PREFIX Enable SIDPlay1 with install-PREFIX is], | |
82 [ | |
83 if test "$withval" = yes; then | |
84 xs_sidplay2=yes | |
85 xs_sidplay2_library="" | |
86 xs_sidplay2_includes="" | |
87 else | |
88 if test "$withval" = no; then | |
89 xs_sidplay2=no | |
90 else | |
91 xs_sidplay2=yes | |
92 xs_sidplay2_includes="$withval/include" | |
93 xs_sidplay2_library="$withval/lib" | |
94 fi | |
95 fi | |
96 ],[ | |
97 xs_sidplay2=yes | |
98 xs_sidplay2_library="" | |
99 xs_sidplay2_includes="" | |
100 ]) | |
101 | |
102 AC_ARG_WITH(sidplay2-inc, | |
103 [ --with-sidplay2-inc=DIR Where the SIDPlay2 headers are located], | |
104 [xs_sidplay2_includes="$withval"],) | |
105 | |
106 AC_ARG_WITH(sidplay2-lib, | |
107 [ --with-sidplay2-lib=DIR Where the SIDPlay2 library is installed], | |
108 [xs_sidplay2_library="$withval"],) | |
109 | |
110 | |
111 dnl *** | |
112 dnl *** Determine if libraries are wanted and available | |
113 dnl *** | |
114 OPT_SIDPLAY1="no" | |
115 if test "$xs_sidplay1" = yes; then | |
116 XS_PATH_LIBSIDPLAY1 | |
117 if test "$xs_have_sidplay1" = yes; then | |
118 AC_DEFINE(ENABLE_SIDPLAY1) | |
119 OPT_SIDPLAY1="yes" | |
120 else | |
121 AC_MSG_ERROR([libSIDPlay1 library and/or headers were not found!]) | |
122 fi | |
123 fi | |
124 | |
125 | |
126 OPT_SIDPLAY2="no" | |
127 if test "$xs_sidplay2" = yes; then | |
128 LIBSIDPLAY2_REQUIRED_VERSION="2.1.0" | |
129 XS_PATH_LIBSIDPLAY2 | |
130 if test "$xs_have_sidplay2" = yes; then | |
131 AC_DEFINE(ENABLE_SIDPLAY2) | |
132 OPT_SIDPLAY2="yes" | |
133 BUILDERS_FIND | |
134 BUILDERS_FIND_RESID | |
135 if test "$builders_available" = no; then | |
136 AC_MSG_ERROR([No builder modules were found in the sidbuilders directory!]); | |
137 fi | |
138 else | |
139 AC_MSG_ERROR([libSIDPlay2 library and/or headers were not found!]) | |
140 fi | |
141 fi | |
142 | |
143 | |
144 dnl *** | |
145 dnl *** Check if we have some SIDPlay version | |
146 dnl *** | |
147 if test "$OPT_SIDPLAY1" = no; then | |
148 if test "$OPT_SIDPLAY2" = no; then | |
149 AC_MSG_ERROR([Either libSIDPlay1 or libSIDPlay2 is required! Please read INSTALL for more information!]) | |
150 fi | |
151 fi | |
43 | 152 |
44 | 153 |
45 dnl *** | 154 dnl *** |
46 dnl *** Check XMMS version | 155 dnl *** Check XMMS version |
47 dnl *** | 156 dnl *** |
49 AC_MSG_ERROR([*** XMMS >= 1.2.0 not found. You need XMMS v1.2.0 or later to use XMMS-SID plugin.]) | 158 AC_MSG_ERROR([*** XMMS >= 1.2.0 not found. You need XMMS v1.2.0 or later to use XMMS-SID plugin.]) |
50 ]) | 159 ]) |
51 libdir=$XMMS_INPUT_PLUGIN_DIR | 160 libdir=$XMMS_INPUT_PLUGIN_DIR |
52 | 161 |
53 XMMS_TEST_VERSION($XMMS_VERSION, 1.2.5, [ | 162 XMMS_TEST_VERSION($XMMS_VERSION, 1.2.5, [ |
54 AC_DEFINE(HAVE_XMMSEXTRA) | 163 AC_DEFINE(ENABLE_XMMSEXTRA) |
55 OPT_XMMSEXTRA="yes" | 164 OPT_XMMSEXTRA="yes" |
56 ], [ | 165 ], [ |
57 OPT_XMMSEXTRA="no" | 166 OPT_XMMSEXTRA="no" |
58 ]) | 167 ]) |
59 | 168 |
60 | 169 |
61 dnl *** | 170 dnl *** |
62 dnl *** Check for optional settings | |
63 dnl *** | |
64 OPT_SUBSONGSEL="yes" | |
65 | |
66 AC_ARG_ENABLE(subsongsel, | |
67 [ | |
68 XMMS-SID specific options: | |
69 --disable-subsongsel Disable SIDAmp-style sub-song selector], | |
70 [ | |
71 OPT_SUBSONGSEL="yes" | |
72 ], [ | |
73 OPT_SUBSONGSEL="no" | |
74 ]) | |
75 | |
76 if test $OPT_SUBSONGSEL = "yes"; then | |
77 AC_DEFINE(USE_SUBSONGSEL) | |
78 fi | |
79 | |
80 | |
81 dnl *** | |
82 dnl *** Define some templates | 171 dnl *** Define some templates |
83 dnl *** | 172 dnl *** |
84 AC_DEFINE(USE_SUBSONGSEL, 0, Define to 1 if user wants to use SIDAmp-style sub-song selector) | 173 AC_DEFINE(ENABLE_XMMSEXTRA, 0, Define to 1 if you have XMMS version 1.2.5 or later) |
85 AC_DEFINE(HAVE_XMMSEXTRA, 0, Define to 1 if you have XMMS version 1.2.5 or later) | 174 AC_DEFINE(ENABLE_SIDPLAY1, 1, Define to 1 if you want to use libSIDPlay 1) |
175 AC_DEFINE(ENABLE_SIDPLAY2, 1, Define to 1 if you want to use libSIDPlay 2) | |
86 | 176 |
87 | 177 |
88 dnl *** | 178 dnl *** |
89 dnl *** And finally, output the all generatable files! | 179 dnl *** And finally, output the all generatable files! |
90 dnl *** | 180 dnl *** |
91 AC_CONFIG_FILES([ | 181 AC_CONFIG_FILES([ |
92 Makefile | 182 Makefile |
93 src/Makefile | 183 src/Makefile |
94 xmms-sid.spec | 184 xmms-sid.spec |
95 ]) | 185 ]) |
96 | |
97 AC_OUTPUT | 186 AC_OUTPUT |
98 | 187 |
99 | 188 |
100 dnl *** | 189 dnl *** |
101 dnl *** Show the result message | 190 dnl *** Show the result message |
102 dnl *** | 191 dnl *** |
103 AC_MSG_RESULT([ | 192 AC_MSG_RESULT([ |
104 XMMS-SID has been configured successfully: | 193 XMMS-SID has been configured successfully: |
105 | 194 |
106 Installation directory : $libdir | 195 Installation directory : $libdir |
107 Sub-song selector enabled : $OPT_SUBSONGSEL | |
108 XMMS >= v1.2.5 extra features : $OPT_XMMSEXTRA | 196 XMMS >= v1.2.5 extra features : $OPT_XMMSEXTRA |
109 libSIDPlay 1 : $have_sidplay | 197 libSIDPlay 1 support : $OPT_SIDPLAY1 |
110 libSIDPlay 2 : $have_sidplay2 | 198 libSIDPlay 2 support : $OPT_SIDPLAY2 |
111 | 199 |
112 Now just run 'make && make install'! | 200 ]) |
113 ]) |