comparison configure.in @ 443:62fc59951eda

Cleanups
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 07 Jan 2007 09:47:03 +0000
parents c016b0e2f758
children 3119716480ad
comparison
equal deleted inserted replaced
442:94c531f0c0a4 443:62fc59951eda
5 dnl Require autoconf 2.56 or later 5 dnl Require autoconf 2.56 or later
6 AC_PREREQ([2.56]) 6 AC_PREREQ([2.56])
7 7
8 dnl Initialize 8 dnl Initialize
9 AC_INIT([XMMS-SID], [0.8.0beta16], [ccr@tnsp.org]) 9 AC_INIT([XMMS-SID], [0.8.0beta16], [ccr@tnsp.org])
10 AC_COPYRIGHT([[(C) 2003-2006 Matti 'ccr' Hämäläinen]]) 10 AC_COPYRIGHT([[(C) 2003-2007 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([src/config.h]) 13 AC_CONFIG_HEADERS([src/config.h])
14 AM_GNU_GETTEXT_VERSION([0.14.1]) 14 AM_GNU_GETTEXT_VERSION([0.14.1])
15 AM_GNU_GETTEXT([external]) 15 AM_GNU_GETTEXT([external])
79 79
80 80
81 dnl *** 81 dnl ***
82 dnl *** Enable or disable themetune support/installation 82 dnl *** Enable or disable themetune support/installation
83 dnl *** 83 dnl ***
84 AC_ARG_ENABLE(themetune, 84 AC_ARG_ENABLE([themetune],
85 [ 85 [
86 --disable-themetune Disable XMMS-SID theme song-related code and 86 --disable-themetune Disable XMMS-SID theme song-related code and
87 installation of the SID-tune file. The tune is 87 installation of the SID-tune file. The tune is
88 not under GNU GPL, refer to README for license. 88 not under GNU GPL, refer to README for license.
89 ], 89 ],[
90 [
91 if test "x$enableval" = "xyes"; then 90 if test "x$enableval" = "xyes"; then
92 OPT_THEMETUNE=yes 91 OPT_THEMETUNE=yes
93 else 92 else
94 if test "x$enableval" = "xno"; then 93 if test "x$enableval" = "xno"; then
95 OPT_THEMETUNE=no 94 OPT_THEMETUNE=no
96 else 95 else
97 OPT_THEMETUNE=no 96 OPT_THEMETUNE=no
98 fi 97 fi
99 fi 98 fi
100 ],[ 99 ],[
101 OPT_THEMETUNE=yes 100 OPT_THEMETUNE=yes
102 ]) 101 ])
105 if test "x$OPT_THEMETUNE" = "xyes"; then 104 if test "x$OPT_THEMETUNE" = "xyes"; then
106 THEMETUNE_FILE="Kummatti_City.sid" 105 THEMETUNE_FILE="Kummatti_City.sid"
107 106
108 if test "x${datadir}" = 'x${prefix}/share'; then 107 if test "x${datadir}" = 'x${prefix}/share'; then
109 if test "x${prefix}" = "xNONE"; then 108 if test "x${prefix}" = "xNONE"; then
110 AC_DEFINE_UNQUOTED([THEMETUNE_FILE], "${ac_default_prefix}/share/${PACKAGE}/${THEMETUNE_FILE}") 109 AC_DEFINE_UNQUOTED([THEMETUNE_FILE], "${ac_default_prefix}/share/${PACKAGE}/${THEMETUNE_FILE}")
111 else 110 else
112 AC_DEFINE_UNQUOTED([THEMETUNE_FILE], "${prefix}/share/${PACKAGE}/${THEMETUNE_FILE}") 111 AC_DEFINE_UNQUOTED([THEMETUNE_FILE], "${prefix}/share/${PACKAGE}/${THEMETUNE_FILE}")
113 fi 112 fi
114 else 113 else
115 AC_DEFINE_UNQUOTED([THEMETUNE_FILE], "${datadir}/${PACKAGE}/${THEMETUNE_FILE}") 114 AC_DEFINE_UNQUOTED([THEMETUNE_FILE], "${datadir}/${PACKAGE}/${THEMETUNE_FILE}")
116 fi 115 fi
117 116
118 AC_DEFINE([HAVE_THEMETUNE]) 117 AC_DEFINE([HAVE_THEMETUNE])
119 else 118 else
120 THEMETUNE_FILE="" 119 THEMETUNE_FILE=""
121 fi 120 fi
122 AC_SUBST([THEMETUNE_FILE]) 121 dnl AC_SUBST([THEMETUNE_FILE])
123 122
124 123
125 dnl *** 124 dnl ***
126 dnl *** libSIDPlay 1 options 125 dnl *** libSIDPlay 1 options
127 dnl *** 126 dnl ***
132 if test "x$withval" = "xyes"; then 131 if test "x$withval" = "xyes"; then
133 xs_sidplay1=yes 132 xs_sidplay1=yes
134 xs_sidplay1_library="" 133 xs_sidplay1_library=""
135 xs_sidplay1_includes="" 134 xs_sidplay1_includes=""
136 else 135 else
137 if test "x$withval" = "xno"; then 136 if test "x$withval" = "xno"; then
138 xs_sidplay1=no 137 xs_sidplay1=no
139 else 138 else
140 xs_sidplay1=yes 139 xs_sidplay1=yes
141 xs_sidplay1_includes="$withval/include" 140 xs_sidplay1_includes="$withval/include"
142 xs_sidplay1_library="$withval/lib" 141 xs_sidplay1_library="$withval/lib"
143 fi 142 fi
144 fi 143 fi
145 ],[ 144 ],[
146 xs_sidplay1=try 145 xs_sidplay1=try
147 xs_sidplay1_library="" 146 xs_sidplay1_library=""
148 xs_sidplay1_includes="" 147 xs_sidplay1_includes=""
149 ]) 148 ])
150 149
151 150
152 AC_ARG_WITH(sidplay1-inc, 151 AC_ARG_WITH(sidplay1-inc,
153 [ --with-sidplay1-inc=DIR Where the SIDPlay1 headers are located], 152 [ --with-sidplay1-inc=DIR Where the SIDPlay1 headers are located],
164 AC_ARG_WITH(sidplay2, 163 AC_ARG_WITH(sidplay2,
165 [ 164 [
166 --with-sidplay2=PREFIX Enable SIDPlay2 with install-PREFIX], 165 --with-sidplay2=PREFIX Enable SIDPlay2 with install-PREFIX],
167 [ 166 [
168 if test "x$withval" = "xyes"; then 167 if test "x$withval" = "xyes"; then
169 xs_sidplay2=yes 168 xs_sidplay2=yes
170 xs_sidplay2_library="" 169 xs_sidplay2_library=""
171 xs_sidplay2_includes="" 170 xs_sidplay2_includes=""
172 else 171 else
173 if test "x$withval" = "xno"; then 172 if test "x$withval" = "xno"; then
174 xs_sidplay2=no 173 xs_sidplay2=no
175 else 174 else
176 xs_sidplay2=yes 175 xs_sidplay2=yes
177 xs_sidplay2_includes="$withval/include" 176 xs_sidplay2_includes="$withval/include"
178 xs_sidplay2_library="$withval/lib" 177 xs_sidplay2_library="$withval/lib"
179 fi 178 fi
180 fi 179 fi
181 ],[ 180 ],[
182 xs_sidplay2=try 181 xs_sidplay2=try
183 xs_sidplay2_library="" 182 xs_sidplay2_library=""
184 xs_sidplay2_includes="" 183 xs_sidplay2_includes=""
185 ]) 184 ])
186 185
187 186
188 AC_ARG_WITH(sidplay2-inc, 187 AC_ARG_WITH(sidplay2-inc,
189 [ --with-sidplay2-inc=DIR Where the SIDPlay2 headers are located], 188 [ --with-sidplay2-inc=DIR Where the SIDPlay2 headers are located],
199 dnl *** Determine if libraries are wanted and available 198 dnl *** Determine if libraries are wanted and available
200 dnl *** 199 dnl ***
201 OPT_SIDPLAY1="no" 200 OPT_SIDPLAY1="no"
202 if test "x$xs_sidplay1" = "xtry"; then 201 if test "x$xs_sidplay1" = "xtry"; then
203 XS_PATH_LIBSIDPLAY1 202 XS_PATH_LIBSIDPLAY1
204 else 203 else
205 if test "x$xs_sidplay1" = "xyes"; then 204 if test "x$xs_sidplay1" = "xyes"; then
206 XS_PATH_LIBSIDPLAY1 205 XS_PATH_LIBSIDPLAY1
207 if test "x$xs_have_sidplay1" = "xno"; then 206 if test "x$xs_have_sidplay1" = "xno"; then
208 AC_MSG_ERROR([libSIDPlay1 library and/or headers were not found!]) 207 AC_MSG_ERROR([libSIDPlay1 library and/or headers were not found!])
209 fi 208 fi
210 fi 209 fi
211 fi 210 fi
212 if test "x$xs_have_sidplay1" = "xyes"; then 211 if test "x$xs_have_sidplay1" = "xyes"; then
213 AC_DEFINE([HAVE_SIDPLAY1]) 212 AC_DEFINE([HAVE_SIDPLAY1])
218 217
219 OPT_SIDPLAY2="no" 218 OPT_SIDPLAY2="no"
220 LIBSIDPLAY2_REQUIRED_VERSION="2.1.0" 219 LIBSIDPLAY2_REQUIRED_VERSION="2.1.0"
221 if test "x$xs_sidplay2" = "xtry"; then 220 if test "x$xs_sidplay2" = "xtry"; then
222 XS_PATH_LIBSIDPLAY2 221 XS_PATH_LIBSIDPLAY2
223 else 222 else
224 if test "x$xs_sidplay2" = "xyes"; then 223 if test "x$xs_sidplay2" = "xyes"; then
225 XS_PATH_LIBSIDPLAY2 224 XS_PATH_LIBSIDPLAY2
226 if test "x$xs_have_sidplay2" = "xno"; then 225 if test "x$xs_have_sidplay2" = "xno"; then
227 AC_MSG_ERROR([libSIDPlay2 library and/or headers were not found!]) 226 AC_MSG_ERROR([libSIDPlay2 library and/or headers were not found!])
228 fi 227 fi
229 fi 228 fi
230 fi 229 fi
231 if test "x$xs_have_sidplay2" = "xyes"; then 230 if test "x$xs_have_sidplay2" = "xyes"; then
232 AC_DEFINE([HAVE_SIDPLAY2]) 231 AC_DEFINE([HAVE_SIDPLAY2])
243 dnl *** 242 dnl ***
244 dnl *** Check if we have some emulator library available? 243 dnl *** Check if we have some emulator library available?
245 dnl *** 244 dnl ***
246 if test "x$OPT_SIDPLAY1" = "xno"; then 245 if test "x$OPT_SIDPLAY1" = "xno"; then
247 if test "x$OPT_SIDPLAY2" = "xno"; then 246 if test "x$OPT_SIDPLAY2" = "xno"; then
248 AC_MSG_ERROR([Either libSIDPlay1 or libSIDPlay2 is required! Please read INSTALL for more information!]) 247 AC_MSG_ERROR([Either libSIDPlay1 or libSIDPlay2 is required! Please read INSTALL for more information!])
249 fi 248 fi
250 fi 249 fi
251 250
252 251
253 dnl *** 252 dnl ***
259 CPPFLAGS="$CPPFLAGS -I${prefix}/include" 258 CPPFLAGS="$CPPFLAGS -I${prefix}/include"
260 fi 259 fi
261 260
262 AC_EGREP_HEADER([set_song_position],[xmms/plugin.h],[ 261 AC_EGREP_HEADER([set_song_position],[xmms/plugin.h],[
263 OPT_SONGPOS="yes" 262 OPT_SONGPOS="yes"
264 AC_DEFINE(HAVE_SONG_POSITION) 263 AC_DEFINE([HAVE_SONG_POSITION])
265 AC_MSG_RESULT([yes]) 264 AC_MSG_RESULT([yes])
266 ],[ 265 ],[
267 OPT_SONGPOS="no" 266 OPT_SONGPOS="no"
268 AC_MSG_RESULT([no]) 267 AC_MSG_RESULT([no])
269 ]) 268 ])
272 271
273 272
274 dnl *** 273 dnl ***
275 dnl *** Check XMMS version 274 dnl *** Check XMMS version
276 dnl *** 275 dnl ***
277 AM_PATH_XMMS(1.2.0,, [ 276 AM_PATH_XMMS([1.2.0],, [
278 AC_MSG_ERROR([*** XMMS >= 1.2.0 not found. You need XMMS v1.2.0 or later to use XMMS-SID plugin.]) 277 AC_MSG_ERROR([*** XMMS >= 1.2.0 not found. You need XMMS v1.2.0 or later to use XMMS-SID plugin.])
279 ]) 278 ])
280 libdir=$XMMS_INPUT_PLUGIN_DIR 279 libdir=$XMMS_INPUT_PLUGIN_DIR
281 280
282 XMMS_TEST_VERSION($XMMS_VERSION, 1.2.5, [ 281 XMMS_TEST_VERSION([$XMMS_VERSION], [1.2.5], [
283 AC_DEFINE(HAVE_XMMSEXTRA) 282 AC_DEFINE([HAVE_XMMSEXTRA])
284 OPT_XMMSEXTRA="yes" 283 OPT_XMMSEXTRA="yes"
285 ], [ 284 ], [
286 OPT_XMMSEXTRA="no" 285 OPT_XMMSEXTRA="no"
287 ]) 286 ])
288 287
289 288
290 dnl *** 289 dnl ***
291 dnl *** And finally, output the all generatable files! 290 dnl *** And finally, output the all generatable files!