diff configure.in @ 125:532ec0ad5e59

Added support/detection for libNanoSID.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 14 Jan 2004 03:56:01 +0000
parents d2543dbd0e04
children 1e38806f7a3b
line wrap: on
line diff
--- a/configure.in	Wed Jan 14 03:55:05 2004 +0000
+++ b/configure.in	Wed Jan 14 03:56:01 2004 +0000
@@ -21,6 +21,7 @@
 AH_TEMPLATE([HAVE_UNSIGNEDPCM],[Define if your audiodevice supports _ONLY_ UNSIGNED PCM samples, otherwise leave undefined.])
 AH_TEMPLATE([HAVE_SIDPLAY1],[Define if you have and want to use libSIDPlay 1])
 AH_TEMPLATE([HAVE_SIDPLAY2],[Define if you have and want to use libSIDPlay 2])
+AH_TEMPLATE([HAVE_NANOSID],[Define if you have and want to use libNanoSID])
 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])
 
@@ -154,7 +155,44 @@
 [xs_sidplay2_library="$withval"],)
 
 
+dnl ***
+dnl *** libNanoSID options
+dnl ***
+AC_ARG_WITH(nanosid,
+[
+  --with-nanosid=PREFIX   Enable NanoSID with PREFIX],
+[
+if test "$withval" = yes; then
+xs_nanosid=yes
+xs_nanosid_library=""
+xs_nanosid_includes=""
+else
+if test "$withval" = no; then
+	xs_nanosid=no
+	else
+	xs_nanosid=yes
+	xs_nanosid_includes="$withval/include"
+	xs_nanosid_library="$withval/lib"
+	fi
+fi
+],[
+xs_nanosid=xtry
+xs_nanosid_library=""
+xs_nanosid_includes=""
+])
+
+AC_ARG_WITH(nanosid-inc,
+[  --with-nanosid-inc=DIR    Where the NanoSID headers are located],
+[xs_nanosid_includes="$withval"],)
+
+AC_ARG_WITH(sidplay1-lib,
+[  --with-nanosid-lib=DIR    Where the NanoSID library is installed],
+[xs_nanosid_library="$withval"],)
+
+
+dnl ***
 dnl *** Determine if libraries are wanted and available
+dnl ***
 OPT_SIDPLAY1="no"
 if test "$xs_sidplay1" = xtry; then
 	XS_PATH_LIBSIDPLAY1
@@ -198,12 +236,34 @@
 	fi
 fi
 
+
+OPT_NANOSID="no"
+if test "$xs_nanosid" = xtry; then
+	XS_PATH_LIBNANOSID
+	else
+	if test "$xs_nanosid" = yes; then
+		XS_PATH_LIBNANOSID
+		if test "$xs_have_nanosid" = no; then
+		AC_MSG_ERROR([libNanoSID library and/or headers were not found!])
+		fi
+	fi
+fi
+if test "$xs_have_nanosid" = yes; then
+	AC_DEFINE(HAVE_NANOSID)
+	OPT_NANOSID="yes"
+fi
+
+
 AC_SUBST(REQUIRE_LIBRARY,$xs_reqlib)
 
+dnl ***
 dnl *** Check if we have some emulator library available?
+dnl ***
 if test "$OPT_SIDPLAY1" = no; then
 if test "$OPT_SIDPLAY2" = no; then
-AC_MSG_ERROR([Either libSIDPlay1 or libSIDPlay2 is required! Please read INSTALL for more information!])
+if test "$OPT_NANOSID" = no; then
+AC_MSG_ERROR([Either libSIDPlay1, libSIDPlay2 or libNanoSID is required! Please read INSTALL for more information!])
+fi
 fi
 fi
 
@@ -269,5 +329,6 @@
 	libSIDPlay 1 support          : $OPT_SIDPLAY1
 	libSIDPlay 2 support          : $OPT_SIDPLAY2
 		Included builders     : $xs_builders
+	libNanoSID support            : $OPT_NANOSID
 
 ])