[vorbis-dev] Fink's vorbis-tools patch

Nathan I. Sharfi nisharfi at csupomona.edu
Sat Aug 30 23:23:27 PDT 2003


Thought this might be useful to at least consider being included in 1.0.1.

It adds, among other things (maybe), an endian variant of AIFF-C.

Nathan
-------------- next part --------------
diff -urN vorbis-tools-1.0.orig/oggenc/audio.c vorbis-tools-1.0/oggenc/audio.c
--- vorbis-tools-1.0.orig/oggenc/audio.c	Thu Jul 11 16:20:33 2002
+++ vorbis-tools-1.0/oggenc/audio.c	Mon Jan 20 09:42:57 2003
@@ -220,6 +220,8 @@
 	unsigned char buf2[8];
 	aiff_fmt format;
 	aifffile *aiff = malloc(sizeof(aifffile));
+	
+	unsigned int bigendian = 1;
 
 	if(buf[11]=='C')
 		aifc=1;
@@ -258,6 +260,10 @@
 			fprintf(stderr, _("Warning: AIFF-C header truncated.\n"));
 			return 0;
 		}
+		else if( ! memcmp(buffer+18, "sowt", 4) )
+		{
+			bigendian = 0;
+		}
 		else if(memcmp(buffer+18, "NONE", 4)) 
 		{
 			fprintf(stderr, _("Warning: Can't handle compressed AIFF-C\n"));
@@ -301,7 +307,7 @@
 		aiff->channels = format.channels;
 		aiff->samplesize = format.samplesize;
 		aiff->totalsamples = format.totalframes;
-		aiff->bigendian = 1;
+		aiff->bigendian = bigendian;
 
 		opt->readdata = (void *)aiff;
 
diff -urN vorbis-tools-1.0.orig/acinclude.m4 vorbis-tools-1.0/acinclude.m4
--- vorbis-tools-1.0.orig/acinclude.m4	Fri Jul 12 18:24:54 2002
+++ vorbis-tools-1.0/acinclude.m4	Mon Jan 20 19:44:11 2003
@@ -425,36 +425,20 @@
 
 if test "x$curl_prefix" != "xno" ; then
 
-  if test "x$curl_libraries" != "x" ; then
-    CURL_LIBS="-L$curl_libraries"
-  elif test "x$curl_prefix" != "x" ; then
-    CURL_LIBS="-L$curl_prefix/lib"
-  elif test "x$prefix" != "xNONE" ; then
-    CURL_LIBS="-L$prefix/lib"
-  fi
-
-  CURL_LIBS="$CURL_LIBS -lcurl"
-
-  if test "x$curl_includes" != "x" ; then
-    CURL_CFLAGS="-I$curl_includes"
-  elif test "x$curl_prefix" != "x" ; then
-    CURL_CFLAGS="-I$curl_prefix/include"
-  elif test "x$prefix" != "xNONE"; then
-    CURL_CFLAGS="-I$prefix/include"
-  fi
-
-  AC_MSG_CHECKING(for libcurl)
-  no_curl=""
-
+  CURL_LIBS="/usr/lib/libcurl.a -lssl -lcrypto"
 
   if test "x$enable_curltest" = "xyes" ; then
-    ac_save_CFLAGS="$CFLAGS"
-    ac_save_LIBS="$LIBS"
-    CFLAGS="$CFLAGS $CURL_CFLAGS"
-    LIBS="$LIBS $CURL_LIBS"
+
+      ac_save_CFLAGS="$CFLAGS"
+      ac_save_LIBS="$LIBS"
+      CFLAGS="$CFLAGS $CURL_CFLAGS"
+      LIBS="$LIBS $CURL_LIBS"
 dnl
 dnl Now check if the installed libcurl is sufficiently new.
 dnl
+      AC_MSG_CHECKING(for libcurl)
+      no_curl=""
+
       rm -f conf.curltest
       AC_TRY_RUN([
 #include <stdio.h>
@@ -468,53 +452,57 @@
   return 0;
 }
 
+void func ()
+{
+  curl_easy_perform(0);
+}
 ],, no_curl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
-       CFLAGS="$ac_save_CFLAGS"
-       LIBS="$ac_save_LIBS"
-  fi
-
-  if test "x$no_curl" = "x" ; then
-     AC_MSG_RESULT(yes)
-     ifelse([$1], , :, [$1])     
-  else
-     AC_MSG_RESULT(no)
-     if test -f conf.curltest ; then
-       :
-     else
-       echo "*** Could not run libcurl test program, checking why..."
-       CFLAGS="$CFLAGS $CURL_CFLAGS"
-       LIBS="$LIBS $CURL_LIBS"
-       AC_TRY_LINK([
+      CFLAGS="$ac_save_CFLAGS"
+      LIBS="$ac_save_LIBS"
+      if test "x$no_curl" = "x" ; then
+        AC_MSG_RESULT(yes)
+        ifelse([$1], , :, [$1])     
+      else
+        AC_MSG_RESULT(no)
+        if test -f conf.curltest ; then
+          :
+        else
+          echo "*** Could not run libcurl test program, checking why..."
+          CFLAGS="$CFLAGS $CURL_CFLAGS"
+          LIBS="$LIBS $CURL_LIBS"
+          AC_TRY_LINK([
 #include <stdio.h>
 #include <curl/curl.h>
-],     [ return 0; ],
-       [ echo "*** The test program compiled, but did not run. This usually means"
-       echo "*** that the run-time linker is not finding libcurl or finding the wrong"
-       echo "*** version of libcurl. If it is not finding libcurl, you'll need to set your"
-       echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-       echo "*** to the installed location  Also, make sure you have run ldconfig if that"
-       echo "*** is required on your system"
-       echo "***"
-       echo "*** If you have an old version installed, it is best to remove it, although"
-       echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
-       [ echo "*** The test program failed to compile or link. See the file config.log for the"
-       echo "*** exact error that occured. This usually means libcurl was incorrectly installed"
-       echo "*** or that you have moved libcurl since it was installed." ])
-       CFLAGS="$ac_save_CFLAGS"
-       LIBS="$ac_save_LIBS"
-     fi
-     CURL_CFLAGS=""
-     CURL_LIBS=""
-     ifelse([$2], , :, [$2])
+],        [ return 0; ],
+          [ echo "*** The test program compiled, but did not run. This usually means"
+          echo "*** that the run-time linker is not finding libcurl or finding the wrong"
+          echo "*** version of libcurl. If it is not finding libcurl, you'll need to set your"
+          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
+          echo "*** is required on your system"
+          echo "***"
+          echo "*** If you have an old version installed, it is best to remove it, although"
+          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
+          [ echo "*** The test program failed to compile or link. See the file config.log for the"
+          echo "*** exact error that occured. This usually means libcurl was incorrectly installed"
+          echo "*** or that you have moved libcurl since it was installed." ])
+          CFLAGS="$ac_save_CFLAGS"
+          LIBS="$ac_save_LIBS"
+        fi
+        CURL_CFLAGS=""
+        CURL_LIBS=""
+        ifelse([$2], , :, [$2])
+      fi
   fi
+
   AC_DEFINE(HAVE_CURL, 1, [Define if you have libcurl.])
 else
   CURL_CFLAGS=""
   CURL_LIBS=""
 fi
-  AC_SUBST(CURL_CFLAGS)
-  AC_SUBST(CURL_LIBS)
-  rm -f conf.curltest
+AC_SUBST(CURL_CFLAGS)
+AC_SUBST(CURL_LIBS)
+rm -f conf.curltest
 ])
 
 
diff -urN vorbis-tools-1.0.orig/ogg123/Makefile.am vorbis-tools-1.0/ogg123/Makefile.am
--- vorbis-tools-1.0.orig/ogg123/Makefile.am	Thu Jul 11 04:45:37 2002
+++ vorbis-tools-1.0/ogg123/Makefile.am	Mon Jan 20 10:11:40 2003
@@ -22,7 +22,7 @@
 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
 
 bin_PROGRAMS = ogg123
-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
+docdir = $(datadir)/doc/$(PACKAGE)
 mandir = @MANDIR@
 
 INCLUDES = @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AO_CFLAGS@ @CURL_CFLAGS@ \


More information about the Vorbis-dev mailing list