Integrated IRIX patch (getopt stuff) from Michael Pruett <michael@68k.org>
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Wed, 18 Feb 2004 06:59:40 +0000 (06:59 +0000)
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Wed, 18 Feb 2004 06:59:40 +0000 (06:59 +0000)
git-svn-id: http://svn.xiph.org/trunk/speex@5836 0101bb08-14d6-0310-b084-bc0e0c8e3800

ChangeLog
configure.in
src/Makefile.am
src/speexdec.c
src/speexenc.c

index 10db298..b93377f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-02-18 Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
+       Integrated IRIX patch (getopt stuff) from Michael Pruett <michael@68k.org> 
+
+2004-02-18 Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
+       Changed the Makefile.am so that KDevelop can parse SUBDIRS correctly 
+
 2002/03/27 Jean-Marc Valin:
 Working encoder and decoder for both narrowband and wideband.
 
index 8b9463a..80f45de 100644 (file)
@@ -52,7 +52,15 @@ fi
 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 7ac3d1f..f6b8de1 100644 (file)
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in. -*-Makefile-*-
 
-# $Id: Makefile.am,v 1.10 2003/05/30 02:09:30 jm Exp $
+# $Id: Makefile.am,v 1.11 2004/02/18 06:59:40 jm Exp $
 
 # Disable automatic dependency tracking if using other tools than gcc and gmake
 #AUTOMAKE_OPTIONS = no-dependencies
@@ -18,7 +18,11 @@ noinst_HEADERS = wav_io.h
 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 1a6f9a3..657a4fa 100644 (file)
@@ -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 0cee523..7a43a88 100644 (file)
@@ -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>