[speex-dev] patch for compiling on IRIX

Jean-Marc Valin Jean-Marc.Valin at USherbrooke.ca
Tue Feb 17 23:12:51 PST 2004


Thanks, patch applied to CVS.

        jean-Marc

Le mar 17/02/2004 à 04:01, Michael Pruett a écrit :
> The following patch (based off of the current CVS tree) is necessary
> to compile Speex on IRIX (or any other system that doesn't include
> getopt_long in the system libraries).
> 
> I would suggest further that src/getopt_win.h be renamed to getopt_long.h
> since it's not just Windows that lacks getopt_long.
> 
> Michael
> 
> Index: configure.in
> ===================================================================
> RCS file: /usr/local/cvsroot/speex/configure.in,v
> retrieving revision 1.62
> diff -u -r1.62 configure.in
> --- configure.in	12 Feb 2004 08:30:15 -0000	1.62
> +++ configure.in	17 Feb 2004 08:59:58 -0000
> @@ -52,7 +52,15 @@
>  AC_SUBST(src)
>  
>  AC_CHECK_LIB(m, sin)
> -AC_CHECK_LIB(gnugetopt, getopt_long)
> +
> +# Check for getopt_long; if not found, use included source.
> +AC_CHECK_FUNCS([getopt_long],,
> +[# FreeBSD has a gnugetopt library.
> +  AC_CHECK_LIB([gnugetopt],[getopt_long],
> +[AC_DEFINE([HAVE_GETOPT_LONG])],
> +[# Use the GNU replacement.
> +AC_LIBOBJ(getopt)
> +AC_LIBOBJ(getopt1)])])
>  
>  AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
>  
> Index: src/Makefile.am
> ===================================================================
> RCS file: /usr/local/cvsroot/speex/src/Makefile.am,v
> retrieving revision 1.10
> diff -u -r1.10 Makefile.am
> --- src/Makefile.am	30 May 2003 02:09:30 -0000	1.10
> +++ src/Makefile.am	17 Feb 2004 08:59:58 -0000
> @@ -18,7 +18,11 @@
>  bin_PROGRAMS = speexenc speexdec
>  
>  speexenc_SOURCES = speexenc.c wav_io.c
> -speexenc_LDADD = $(top_builddir)/libspeex/libspeex.la $(OGG_LDFLAGS) $(OGG_LIBS)
> +speexenc_LDADD = $(top_builddir)/libspeex/libspeex.la \
> +	$(OGG_LDFLAGS) $(OGG_LIBS) \
> +	@LTLIBOBJS@
>  
>  speexdec_SOURCES = speexdec.c wav_io.c
> -speexdec_LDADD = $(top_builddir)/libspeex/libspeex.la $(OGG_LDFLAGS) $(OGG_LIBS)
> +speexdec_LDADD = $(top_builddir)/libspeex/libspeex.la \
> +	$(OGG_LDFLAGS) $(OGG_LIBS) \
> +	@LTLIBOBJS@
> Index: src/speexdec.c
> ===================================================================
> RCS file: /usr/local/cvsroot/speex/src/speexdec.c,v
> retrieving revision 1.87
> diff -u -r1.87 speexdec.c
> --- src/speexdec.c	28 Jan 2004 07:51:29 -0000	1.87
> +++ src/speexdec.c	17 Feb 2004 08:59:59 -0000
> @@ -34,6 +34,9 @@
>  #include <unistd.h>
>  #include <getopt.h>
>  #endif
> +#ifndef HAVE_GETOPT_LONG
> +#include "getopt_win.h"
> +#endif
>  #include <stdlib.h>
>  #include <string.h>
>  
> Index: src/speexenc.c
> ===================================================================
> RCS file: /usr/local/cvsroot/speex/src/speexenc.c,v
> retrieving revision 1.85
> diff -u -r1.85 speexenc.c
> --- src/speexenc.c	28 Jan 2004 07:51:30 -0000	1.85
> +++ src/speexenc.c	17 Feb 2004 08:59:59 -0000
> @@ -34,6 +34,9 @@
>  #include <unistd.h>
>  #include <getopt.h>
>  #endif
> +#ifndef HAVE_GETOPT_LONG
> +#include "getopt_win.h"
> +#endif
>  #include <stdlib.h>
>  #include <string.h>
>  #include <time.h>
> --- >8 ----
> List archives:  http://www.xiph.org/archives/
> Ogg project homepage: http://www.xiph.org/ogg/
> To unsubscribe from this list, send a message to 'speex-dev-request at xiph.org'
> containing only the word 'unsubscribe' in the body.  No subject is needed.
> Unsubscribe messages sent to the list will be ignored/filtered.

-- 
Jean-Marc Valin, M.Sc.A., ing. jr.
LABORIUS (http://www.gel.usherb.ca/laborius)
Université de Sherbrooke, Québec, Canada


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Ceci est une partie de message numériquement signée.
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20040218/f1b8ab51/signature-0001.pgp


More information about the Speex-dev mailing list