1diff -urw nxesd-orig/configure.ac nxesd/configure.ac
2--- nxesd-orig/configure.ac	2007-05-29 12:06:31.000000000 +0200
3+++ nxesd/configure.ac	2011-05-21 12:33:28.403434748 +0200
4@@ -7,7 +7,7 @@
5 ESD_VERSION=$ESD_MAJOR_VERSION.$ESD_MINOR_VERSION.$ESD_MICRO_VERSION
6
7 AC_CANONICAL_TARGET([])
8-AM_INIT_AUTOMAKE(1.6)
9+AM_INIT_AUTOMAKE([foreign])
10 AM_MAINTAINER_MODE
11
12 AM_CONFIG_HEADER(config.h)
13diff -urw nxesd-orig/m4/as-arts.m4 nxesd/m4/as-arts.m4
14--- nxesd-orig/m4/as-arts.m4	2007-05-29 12:06:29.000000000 +0200
15+++ nxesd/m4/as-arts.m4	2011-05-21 12:31:52.411634866 +0200
16@@ -1,43 +1,23 @@
17-dnl as-arts.m4 0.1.0
18-
19-dnl $Id: as-arts.m4,v 1.1 2005/01/18 07:28:04 ds Exp $
20-dnl if you copy this file to your cvs,
21-dnl add this file using cvs -ko add to retain this header
22-
23-dnl This is an example arts .m4 adapted and scrubbed by thomasvs
24+dnl This should be pulled in from arts.m4
25+dnl
26+dnl Oh my word, I've never hacked automake before - let me know if this is a
27+dnl complete rubbish!
28+dnl Peter L Jones 2002-05-12
29+dnl Snarfed from the ESD code below - but the faults are all mine!
30
31-# Configure paths for ARTS
32-# Philip Stadermann   2001-06-21
33-# stolen from esd.m4
34
35 dnl AM_PATH_ARTS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
36-dnl Test for ARTS, and define ARTS_CXXFLAGS and ARTS_LIBS
37+dnl Test for aRts, and define ARTS_CFLAGS and ARTS_LIBS
38 dnl
39 AC_DEFUN([AM_PATH_ARTS],
40 [dnl
41-dnl Get the cflags and libraries from the artsc-config script
42+dnl Get the cflags and libraries from the arts-config script
43 dnl
44-AC_ARG_WITH(arts-prefix,
45-  AC_HELP_STRING([--with-arts-prefix=PFX],
46-                 [prefix where ARTS is installed (optional)]),
47+AC_ARG_WITH(arts-prefix,[  --with-arts-prefix=PFX   Prefix where ARTS is installed (optional)],
48   arts_prefix="$withval", arts_prefix="")
49-
50-AC_ARG_WITH(arts-exec-prefix,
51-  AC_HELP_STRING([--with-arts-exec-prefix=PFX],
52-                 [exec prefix where ARTS is installed (optional)]),
53-  arts_exec_prefix="$withval", arts_exec_prefix="")
54-
55-AC_ARG_ENABLE(artstest,
56-  AC_HELP_STRING([--disable-artstest],
57-                 [do not try to compile and run a test ARTS program]),
58+AC_ARG_ENABLE(artstest, [  --disable-artstest       Do not try to compile and run a test ARTS program],
59   , enable_artstest=yes)
60
61-  if test x$arts_exec_prefix != x ; then
62-    arts_args="$arts_args --exec-prefix=$arts_exec_prefix"
63-    if test x${ARTS_CONFIG+set} != xset ; then
64-      ARTS_CONFIG=$arts_exec_prefix/bin/artsc-config
65-    fi
66-  fi
67   if test x$arts_prefix != x ; then
68     arts_args="$arts_args --prefix=$arts_prefix"
69     if test x${ARTS_CONFIG+set} != xset ; then
70@@ -47,15 +27,13 @@
71
72   AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
73   min_arts_version=ifelse([$1], ,0.9.5,$1)
74-  AC_MSG_CHECKING(for ARTS artsc - version >= $min_arts_version)
75+  AC_MSG_CHECKING(for ARTS - version >= $min_arts_version)
76   no_arts=""
77   if test "$ARTS_CONFIG" = "no" ; then
78     no_arts=yes
79   else
80-    # FIXME: thomas added this sed to get arts path instead of artsc
81-    # replace -I.../artsc with -I.../arts
82-    ARTS_CXXFLAGS=`$ARTS_CONFIG $artsconf_args --cflags | artsc-config --cflags | sed 's/\(-I.*\)artsc/\1arts/'`
83-    ARTS_LIBS=`$ARTS_CONFIG $artsconf_args --libs | sed 's/artsc$/arts/'`
84+    ARTS_CFLAGS=`$ARTS_CONFIG $artsconf_args --cflags`
85+    ARTS_LIBS=`$ARTS_CONFIG $artsconf_args --libs`
86
87     arts_major_version=`$ARTS_CONFIG $arts_args --version | \
88            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
89@@ -64,38 +42,20 @@
90     arts_micro_version=`$ARTS_CONFIG $arts_config_args --version | \
91            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
92     if test "x$enable_artstest" = "xyes" ; then
93-      dnl ac_save_CXXFLAGS="$CXXFLAGS"
94-      dnl ac_save_LIBS="$LIBS"
95-      dnl CFLAGS="$CFLAGS $ARTS_CXXFLAGS"
96-      dnl LIBS="$LIBS $ARTS_LIBS"
97+      ac_save_CFLAGS="$CFLAGS"
98+      ac_save_LIBS="$LIBS"
99+      CFLAGS="$CFLAGS $ARTS_CFLAGS"
100+      LIBS="$LIBS $ARTS_LIBS"
101 dnl
102 dnl Now check if the installed ARTS is sufficiently new. (Also sanity
103-dnl checks the results of artsc-config to some extent)
104+dnl checks the results of arts-config to some extent
105 dnl
106-
107-dnl a*s: to successfully compile the C++ test app, we need to
108-dnl first make sure we're going to compile it as C++ (with AC_LANG_PUSH),
109-dnl then add the CFLAGS and CLIBS of arts which we just discovered to the
110-dnl C++ compilation and linking flags.
111-dnl We also need to clean up after the test; this means using AC_LANG_POP
112-dnl and restoring the CPPFLAGS and LDFLAGS from the saved values we take
113-dnl here.
114-
115-dnl ask nicely for C++ compilation
116-      AC_LANG_PUSH(C++)
117-
118-dnl save compilation and link flags and make our own
119-      ac_save_CPPFLAGS="$CPPFLAGS"
120-      ac_save_LDFLAGS="$LDFLAGS"
121-      AC_SUBST(CPPFLAGS,"$CPPFLAGS $ARTS_CXXFLAGS")
122-      AC_SUBST(LDFLAGS,"$LDFLAGS $ARTS_CLIBS")
123-
124       rm -f conf.artstest
125       AC_TRY_RUN([
126 #include <stdio.h>
127 #include <stdlib.h>
128 #include <string.h>
129-#include <artsflow.h>
130+#include <artsc.h>
131
132 char*
133 my_strdup (char *str)
134@@ -104,8 +64,7 @@
135
136   if (str)
137     {
138-      // thomas: the original test did not have the typecast
139-      new_str = (char *) malloc ((strlen (str) + 1) * sizeof(char));
140+      new_str = malloc ((strlen (str) + 1) * sizeof(char));
141       strcpy (new_str, str);
142     }
143   else
144@@ -147,15 +106,8 @@
145 }
146
147 ],, no_arts=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
148-      dnl CFLAGS="$ac_save_CFLAGS"
149-      dnl LIBS="$ac_save_LIBS"
150-      dnl a*s this is were we clean up after the test
151-      AC_LANG_POP(C++)
152-      CXXFLAGS="$ac_save_CXXFLAGS"
153-      LDFLAGS="$ac_save_LDFLAGS"
154-      dnl a*s we are sure that these are right, so we make them active
155-      AC_SUBST(CXXFLAGS,"$CXXFLAGS")
156-      AC_SUBST(LDFLAGS,"$LDFLAGS")
157+       CFLAGS="$ac_save_CFLAGS"
158+       LIBS="$ac_save_LIBS"
159     fi
160   fi
161   if test "x$no_arts" = x ; then
162@@ -173,11 +125,11 @@
163         :
164       else
165          echo "*** Could not run ARTS test program, checking why..."
166-         CFLAGS="$CFLAGS $ARTS_CXXFLAGS"
167+          CFLAGS="$CFLAGS $ARTS_CFLAGS"
168          LIBS="$LIBS $ARTS_LIBS"
169          AC_TRY_LINK([
170 #include <stdio.h>
171-#include <artsflow.h>
172+#include <artsc.h>
173 ],      [ return 0; ],
174         [ echo "*** The test program compiled, but did not run. This usually means"
175           echo "*** that the run-time linker is not finding ARTS or finding the wrong"
176@@ -191,19 +143,17 @@
177         [ echo "*** The test program failed to compile or link. See the file config.log for the"
178           echo "*** exact error that occured. This usually means ARTS was incorrectly installed"
179           echo "*** or that you have moved ARTS since it was installed. In the latter case, you"
180-          echo "*** may want to edit the artsc-config script: $ARTS_CONFIG" ])
181+          echo "*** may want to edit the arts-config script: $ARTS_CONFIG" ])
182           CFLAGS="$ac_save_CFLAGS"
183           LIBS="$ac_save_LIBS"
184       fi
185     fi
186-    ARTS_CXXFLAGS=""
187+     ARTS_CFLAGS=""
188     ARTS_LIBS=""
189     ifelse([$3], , :, [$3])
190   fi
191-  AC_SUBST(ARTS_CXXFLAGS)
192+  AC_SUBST(ARTS_CFLAGS)
193   AC_SUBST(ARTS_LIBS)
194   rm -f conf.artstest
195 ])
196-
197-dnl release C++ question
198-
199+dnl End of aRts
200diff -urw nxesd-orig/Makefile.am nxesd/Makefile.am
201--- nxesd-orig/Makefile.am	2007-05-29 12:06:31.000000000 +0200
202+++ nxesd/Makefile.am	2011-05-21 12:30:50.631407225 +0200
203@@ -12,6 +12,10 @@
204 ESDDSP = esddsp
205 libesddsp_la = libesddsp.la
206 endif
207+if BUILD_NXESDDSP
208+NXESDDSP = nxesddsp
209+libesddsp_la = libesddsp.la
210+endif
211 if BUILD_ESDPLAY
212 ESDPLAY = esdplay
213 endif
214@@ -24,6 +28,7 @@
215
216 bin_SCRIPTS = \
217 	$(ESDDSP)	\
218+	$(NXESDDSP)	\
219 	esd-config
220
221 lib_LTLIBRARIES = libesd.la $(libesddsp_la)
222@@ -72,7 +77,7 @@
223 esddir = @ESD_DIR@
224
225 esd_PROGRAMS = \
226-	esd
227+	nxesd
228
229 bin_PROGRAMS = \
230 	esdcat		\
231@@ -84,7 +89,7 @@
232 	esdloop		\
233 	$(ESDPLAY)
234
235-esd_SOURCES = 	\
236+nxesd_SOURCES = 	\
237 	esd.c 		\
238 	clients.c	\
239 	filter.c	\
240@@ -125,7 +130,7 @@
241
242 LDADD = libesd.la $(AUDIOFILE_LIBS)
243
244-esd_LDADD = $(WRAP_LIB) $(LDADD)
245+nxesd_LDADD = $(WRAP_LIB) $(LDADD)
246
247 m4datadir = $(datadir)/aclocal
248 m4data_DATA = esd.m4
249@@ -145,6 +150,7 @@
250 EXTRA_DIST = \
251 	$(getopt_extra)	\
252 	esddsp		\
253+	nxesddsp	\
254 	esound.pc.in	\
255 	esound.spec	\
256 	esound.spec.in	\
257