diff configure.in @ 254:d3a4d35f2a8f

Themetune, at least temporarily. Haven't asked Agemixer yet for permission.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 21 Dec 2004 21:04:02 +0000
parents a66c634b222a
children 5b107e78c7c0
line wrap: on
line diff
--- a/configure.in	Tue Dec 21 20:17:02 2004 +0000
+++ b/configure.in	Tue Dec 21 21:04:02 2004 +0000
@@ -22,6 +22,8 @@
 AH_TEMPLATE([HAVE_SIDPLAY2],[Define if you have and want to use libSIDPlay 2])
 AH_TEMPLATE([HAVE_RESID_BUILDER],[Define if you have reSID with libSIDPlay 2])
 AH_TEMPLATE([HAVE_HARDSID_BUILDER],[Define if you have HardSID with libSIDPlay 2])
+AH_TEMPLATE([HAVE_THEMETUNE],[Define if you want to build code to play XMMS-SID theme SID-tune. The tune needs to be installed too, though.])
+AH_TEMPLATE([THEMETUNE_FILE],[Path and filename of the XMMS-SID theme song])
 
 
 dnl ***
@@ -70,6 +72,52 @@
 AC_CHECK_FUNCS([memset strcasecmp strerror])
 AC_CHECK_TYPES([size_t])
 
+
+dnl ***
+dnl *** Enable or disable themetune support/installation
+dnl ***
+AC_ARG_ENABLE(themetune,
+[
+  --disable-themetune   Disable XMMS-SID theme song-related
+                        code and installation of SID-tune.
+                        The tune is not under GNU GPL, refer
+                        to documentation (README) for info.
+],
+[
+if test "x$enableval" = xyes; then
+OPT_THEMETUNE=yes
+else
+if test "x$enableval" = xno; then
+	OPT_THEMETUNE=no
+	else
+	OPT_THEMETUNE=no
+	fi
+fi
+],[
+OPT_THEMETUNE=yes
+])
+
+dnl *** Bits and pieces stolen from Glade generated configure.in
+if test "x$OPT_THEMETUNE" = xyes; then
+	THEMETUNE_FILE="Kummatti_City.sid"
+
+	if test "x${datadir}" = 'x${prefix}/share'; then
+		if test "x${prefix}" = "xNONE"; then
+		AC_DEFINE_UNQUOTED([THEMETUNE_FILE], "${ac_default_prefix}/share/${PACKAGE}/${THEMETUNE_FILE}")
+		else
+		AC_DEFINE_UNQUOTED([THEMETUNE_FILE], "${prefix}/share/${PACKAGE}/${THEMETUNE_FILE}")
+		fi
+	else
+	AC_DEFINE_UNQUOTED([THEMETUNE_FILE], "${datadir}/${PACKAGE}/${THEMETUNE_FILE}")
+	fi
+
+	AC_DEFINE([HAVE_THEMETUNE])
+else
+	THEMETUNE_FILE=""
+fi
+AC_SUBST([THEMETUNE_FILE])
+
+
 dnl ***
 dnl *** libSIDPlay 1 options
 dnl ***
@@ -77,12 +125,12 @@
 [
   --with-sidplay1=PREFIX   Enable SIDPlay1 with install-PREFIX],
 [
-if test "$withval" = yes; then
+if test "x$withval" = xyes; then
 xs_sidplay1=yes
 xs_sidplay1_library=""
 xs_sidplay1_includes=""
 else
-if test "$withval" = no; then
+if test "x$withval" = xno; then
 	xs_sidplay1=no
 	else
 	xs_sidplay1=yes
@@ -91,7 +139,7 @@
 	fi
 fi
 ],[
-xs_sidplay1=xtry
+xs_sidplay1=try
 xs_sidplay1_library=""
 xs_sidplay1_includes=""
 ])
@@ -113,12 +161,12 @@
 [
   --with-sidplay2=PREFIX   Enable SIDPlay2 with install-PREFIX],
 [
-if test "$withval" = yes; then
+if test "x$withval" = xyes; then
 xs_sidplay2=yes
 xs_sidplay2_library=""
 xs_sidplay2_includes=""
 else
-if test "$withval" = no; then
+if test "x$withval" = xno; then
 	xs_sidplay2=no
 	else
 	xs_sidplay2=yes
@@ -127,7 +175,7 @@
 	fi
 fi
 ],[
-xs_sidplay2=xtry
+xs_sidplay2=try
 xs_sidplay2_library=""
 xs_sidplay2_includes=""
 ])
@@ -147,18 +195,18 @@
 dnl *** Determine if libraries are wanted and available
 dnl ***
 OPT_SIDPLAY1="no"
-if test "$xs_sidplay1" = xtry; then
+if test "x$xs_sidplay1" = xtry; then
 	XS_PATH_LIBSIDPLAY1
 	else
-	if test "$xs_sidplay1" = yes; then
+	if test "x$xs_sidplay1" = xyes; then
 		XS_PATH_LIBSIDPLAY1
-		if test "$xs_have_sidplay1" = no; then
+		if test "x$xs_have_sidplay1" = xno; then
 		AC_MSG_ERROR([libSIDPlay1 library and/or headers were not found!])
 		fi
 	fi
 fi
-if test "$xs_have_sidplay1" = yes; then
-	AC_DEFINE(HAVE_SIDPLAY1)
+if test "x$xs_have_sidplay1" = xyes; then
+	AC_DEFINE([HAVE_SIDPLAY1])
 	OPT_SIDPLAY1="yes"
 fi
 
@@ -166,23 +214,23 @@
 
 OPT_SIDPLAY2="no"
 LIBSIDPLAY2_REQUIRED_VERSION="2.1.0"
-if test "$xs_sidplay2" = xtry; then
+if test "x$xs_sidplay2" = xtry; then
 	XS_PATH_LIBSIDPLAY2
 	else
-	if test "$xs_sidplay2" = yes; then
+	if test "x$xs_sidplay2" = xyes; then
 		XS_PATH_LIBSIDPLAY2
-		if test "$xs_have_sidplay2" = no; then
+		if test "x$xs_have_sidplay2" = xno; then
 		AC_MSG_ERROR([libSIDPlay2 library and/or headers were not found!])
 		fi
 	fi
 fi
-if test "$xs_have_sidplay2" = yes; then
-	AC_DEFINE(HAVE_SIDPLAY2)
+if test "x$xs_have_sidplay2" = xyes; then
+	AC_DEFINE([HAVE_SIDPLAY2])
 	OPT_SIDPLAY2="yes"
 	BUILDERS_FIND
 	BUILDERS_FIND_RESID
 	BUILDERS_FIND_HARDSID
-	if test "$builders_available" = no; then
+	if test "x$builders_available" = xno; then
 		AC_MSG_ERROR([No builder modules were found in the sidbuilders directory!]);
 	fi
 fi
@@ -191,8 +239,8 @@
 dnl ***
 dnl *** Check if we have some emulator library available?
 dnl ***
-if test "$OPT_SIDPLAY1" = no; then
-if test "$OPT_SIDPLAY2" = no; then
+if test "x$OPT_SIDPLAY1" = xno; then
+if test "x$OPT_SIDPLAY2" = xno; then
 AC_MSG_ERROR([Either libSIDPlay1 or libSIDPlay2 is required! Please read INSTALL for more information!])
 fi
 fi
@@ -207,7 +255,7 @@
   CPPFLAGS="$CPPFLAGS -I${prefix}/include"
 fi
 
-AC_EGREP_HEADER(set_song_position,xmms/plugin.h,
+AC_EGREP_HEADER([set_song_position],[xmms/plugin.h],
 [
 OPT_SONGPOS="yes"
 AC_DEFINE(HAVE_SONG_POSITION)
@@ -223,7 +271,7 @@
 dnl ***
 dnl *** Check XMMS version
 dnl ***
-AM_PATH_XMMS(1.2.0,, [
+AM_PATH_XMMS([1.2.0],, [
 AC_MSG_ERROR([*** XMMS >= 1.2.0 not found. You need XMMS v1.2.0 or later to use XMMS-SID plugin.])
 ])
 libdir=$XMMS_INPUT_PLUGIN_DIR
@@ -258,5 +306,5 @@
 	libSIDPlay 1 support          : $OPT_SIDPLAY1
 	libSIDPlay 2 support          : $OPT_SIDPLAY2
 		Included builders     : $xs_builders
-
+	XMMS-SID theme SID-tune       : $OPT_THEMETUNE
 ])