On 29 Mai, Akos Maroy wrote:
>> That's wrong. lame.h doesn't need stdint.h. The correct way of doing
>> this is to add
>> #ifdef HAVE_STDIINT_H
^
Ooops...
>> #include <stdint.h>
>> #endif
>> into .c files which actually use *int*_t.
>>
>> I fix this later this week and commit everything then.
>
> Sorry. I saw in the first instance that this issue came up, the only
> file included was lame.h. I'm glad this'll get fixed as well.
>
>> No. But it seems auto* behaves like this. :-(
>
> I took a look into the auto* documentation, and it seems that the
>
> AC_CANONICAL_SYSTEM
>
> macro is responsible for this. This is a deprecated macro (as per the
> autoconf info pages), and one should use macros
>
>
> AC_CANONICAL_BUILD
> AC_CANONICAL_HOST
> AC_CANONICAL_TARGET
>
> instead. It seems that AC_CANONICAL_TARGET is the one actually to blame
> here.
I've updated to autoconf 2.53 recently, and autoupdate replaced _SYSTEM
with _TARGET.
> BTW, what is the purpose of this macro? I see there are some safeguards
To allow cross compiling (e.g. build machine = sparc, executable for
x86). Hmmm... I think _TARGET is of no use for us, so I try it with
_HOST.
> for cross compilation:
>
> if test ${cross_compiling} = "no"; then
>
> at line 88 and
>
> if test ${cross_compiling} = "yes"; then
>
> at line 154 in configure.in. But cross_compiling is not defined
> anywhere, thus none if these tests are true ever.
It's not in configure.in because autoconf is responsible for this. grep
through configure and you will see it.
> Maybe this whole AC_CANONICAL_* stuff could be removed?
Some of the optimization stuff in configure.in depends on it.
Can you please test the CVS version of LAME with the attached patch
(I've no gcc 3.1 at the moment)?
Bye,
Alexander.
--
Failure is not an option. It comes bundled with your Microsoft product.
http://www.Leidinger.net Alexander @ Leidinger.net
GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7
Index: config.h.in
===================================================================
RCS file: /cvsroot/lame/lame/config.h.in,v
retrieving revision 1.13
diff -u -r1.13 config.h.in
--- config.h.in 20 Feb 2001 18:34:57 -0000 1.13
+++ config.h.in 29 May 2002 16:33:23 -0000
@@ -1,66 +1,4 @@
-/* config.h.in. Generated automatically from configure.in by autoheader. */
-
-/* Define if on AIX 3.
- System headers sometimes define this.
- We just want to avoid a redefinition error message. */
-#ifndef _ALL_SOURCE
-#undef _ALL_SOURCE
-#endif
-
-/* Define if using alloca.c. */
-#undef C_ALLOCA
-
-/* Define to empty if the keyword does not work. */
-#undef const
-
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
-#undef CRAY_STACKSEG_END
-
-/* Define if you have alloca, as a function or macro. */
-#undef HAVE_ALLOCA
-
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-#undef HAVE_ALLOCA_H
-
-/* Define if the `long double' type works. */
-#undef HAVE_LONG_DOUBLE
-
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
-
-/* Define if on MINIX. */
-#undef _MINIX
-
-/* Define if the system does not provide POSIX.1 features except
- with this defined. */
-#undef _POSIX_1_SOURCE
-
-/* Define if you need to in order for stat and other things to work. */
-#undef _POSIX_SOURCE
-
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-#undef size_t
-
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-#undef STACK_DIRECTION
-
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
-/* Define if your processor stores words with the most significant
- byte first (like Motorola and SPARC, unlike Intel and VAX). */
-#undef WORDS_BIGENDIAN
-
+/* config.h.in. Generated from configure.in by autoheader. */
#undef int8_t
#undef uint8_t
#undef int18_t
@@ -73,110 +11,206 @@
#undef ieee754_float64_t
#undef ieee754_float32_t
-/* The number of bytes in a double. */
-#undef SIZEOF_DOUBLE
+/* debug define */
+#undef ABORTFP
-/* The number of bytes in a float. */
-#undef SIZEOF_FLOAT
+/* enable VBR bitrate histogram */
+#undef BRHIST
-/* The number of bytes in a int. */
-#undef SIZEOF_INT
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+#undef CRAY_STACKSEG_END
-/* The number of bytes in a long. */
-#undef SIZEOF_LONG
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
-/* The number of bytes in a long double. */
-#undef SIZEOF_LONG_DOUBLE
+/* alot of debug output */
+#undef DEBUG
-/* The number of bytes in a long long. */
-#undef SIZEOF_LONG_LONG
+/* double is faster than float on Alpha */
+#undef FLOAT
-/* The number of bytes in a short. */
-#undef SIZEOF_SHORT
+/* float instead of double */
+#undef FLOAT8
-/* The number of bytes in a unsigned int. */
-#undef SIZEOF_UNSIGNED_INT
+/* Define to 1 if you have `alloca', as a function or macro. */
+#undef HAVE_ALLOCA
-/* The number of bytes in a unsigned long. */
-#undef SIZEOF_UNSIGNED_LONG
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
+#undef HAVE_ALLOCA_H
-/* The number of bytes in a unsigned long long. */
-#undef SIZEOF_UNSIGNED_LONG_LONG
+/* we link against libefence */
+#undef HAVE_EFENCE
-/* The number of bytes in a unsigned short. */
-#undef SIZEOF_UNSIGNED_SHORT
+/* Define to 1 if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
-/* Define if you have the gettimeofday function. */
-#undef HAVE_GETTIMEOFDAY
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
-/* Define if you have the socket function. */
-#undef HAVE_SOCKET
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
-/* Define if you have the strtol function. */
-#undef HAVE_STRTOL
+/* have working GTK */
+#undef HAVE_GTK
-/* Define if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
+/* system has 80 bit floats */
+#undef HAVE_IEEE854_FLOAT80
-/* Define if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
-/* Define if you have the <limits.h> header file. */
+/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
-/* Define if you have the <linux/soundcard.h> header file. */
+/* Define to 1 if you have the <linux/soundcard.h> header file. */
#undef HAVE_LINUX_SOUNDCARD_H
-/* Define if you have the <ncurses/termcap.h> header file. */
+/* Define to 1 if long double works and has more range or precision than
+ double. */
+#undef HAVE_LONG_DOUBLE
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* build with mpglib support */
+#undef HAVE_MPGLIB
+
+/* have nasm */
+#undef HAVE_NASM
+
+/* Define to 1 if you have the <ncurses/termcap.h> header file. */
#undef HAVE_NCURSES_TERMCAP_H
-/* Define if you have the <string.h> header file. */
+/* Define to 1 if you have the `socket' function. */
+#undef HAVE_SOCKET
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
-/* Define if you have the <sys/soundcard.h> header file. */
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
+
+/* Define to 1 if you have the <sys/soundcard.h> header file. */
#undef HAVE_SYS_SOUNDCARD_H
-/* Define if you have the <sys/time.h> header file. */
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
-/* Define if you have the <termcap.h> header file. */
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* have termcap */
+#undef HAVE_TERMCAP
+
+/* Define to 1 if you have the <termcap.h> header file. */
#undef HAVE_TERMCAP_H
-/* Define if you have the <unistd.h> header file. */
+/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* build with vorbis support */
+#undef HAVE_VORBIS
+
+/* requested by Frank, seems to be temporary needed for a smooth transition */
+#undef LAME_LIBRARY_BUILD
+
+/* build with libsndfile support */
+#undef LIBSNDFILE
+
+/* use MMX version of choose_table */
+#undef MMX_choose_table
+
+/* no debug build */
+#undef NDEBUG
+
+/* build without hooks for analyzer */
+#undef NOANALYSIS
+
/* Name of package */
#undef PACKAGE
-/* Version number of package */
-#undef VERSION
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
/* Define if compiler has function prototypes */
#undef PROTOTYPES
-/* Define if using the dmalloc debugging malloc package */
-#undef WITH_DMALLOC
+/* The size of a `double', as computed by sizeof. */
+#undef SIZEOF_DOUBLE
-/* system has 80 bit floats */
-#undef HAVE_IEEE854_FLOAT80
+/* The size of a `float', as computed by sizeof. */
+#undef SIZEOF_FLOAT
-/* requested by Frank, seems to be temporary needed for a smooth transition */
-#undef LAME_LIBRARY_BUILD
+/* The size of a `int', as computed by sizeof. */
+#undef SIZEOF_INT
-/* have working GTK */
-#undef HAVE_GTK
+/* The size of a `long', as computed by sizeof. */
+#undef SIZEOF_LONG
-/* we link against libefence */
-#undef HAVE_EFENCE
+/* The size of a `long double', as computed by sizeof. */
+#undef SIZEOF_LONG_DOUBLE
-/* build with libsndfile support */
-#undef LIBSNDFILE
+/* The size of a `long long', as computed by sizeof. */
+#undef SIZEOF_LONG_LONG
-/* build without hooks for analyzer */
-#undef NOANALYSIS
+/* The size of a `short', as computed by sizeof. */
+#undef SIZEOF_SHORT
-/* build with mpglib support */
-#undef HAVE_MPGLIB
+/* The size of a `unsigned int', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_INT
+
+/* The size of a `unsigned long', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_LONG
+
+/* The size of a `unsigned long long', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_LONG_LONG
+
+/* The size of a `unsigned short', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_SHORT
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* IEEE754 compatible machine */
+#undef TAKEHIRO_IEEE754_HACK
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
/* build with layer 1 decoding */
#undef USE_LAYER_1
@@ -184,48 +218,78 @@
/* build with layer 2 decoding */
#undef USE_LAYER_2
-/* build with vorbis support */
-#undef HAVE_VORBIS
+/* Version number of package */
+#undef VERSION
+
+/* Define if using the dmalloc debugging malloc package */
+#undef WITH_DMALLOC
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
+
+/* Define to 1 if on AIX 3.
+ System headers sometimes define this.
+ We just want to avoid a redefinition error message. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
+/* we're on DEC Alpha */
+#undef __DECALPHA__
/* work around a glibc bug */
#undef __NO_MATH_INLINES
-/* enable VBR bitrate histogram */
-#undef BRHIST
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
-/* have termcap */
-#undef HAVE_TERMCAP
+/* Define to `float' if <sys/types.h> does not define. */
+#undef ieee754_float32_t
-/* IEEE754 compatible machine */
-#undef TAKEHIRO_IEEE754_HACK
+/* Define to `double' if <sys/types.h> does not define. */
+#undef ieee754_float64_t
-/* float instead of double */
-#undef FLOAT8
+/* Define to `long double' if <sys/types.h> does not define. */
+#undef ieee854_float80_t
-/* have nasm */
-#undef HAVE_NASM
+/* Define as `__inline' if that's what the C compiler calls it, or to nothing
+ if it is not supported. */
+#undef inline
-/* use MMX version of choose_table */
-#undef MMX_choose_table
+/* Define to `short' if <sys/types.h> does not define. */
+#undef int16_t
-/* double is faster than float on Alpha */
-#undef FLOAT
+/* Define to `long' if <sys/types.h> does not define. */
+#undef int32_t
-/* no debug build */
-#undef NDEBUG
+/* Define to `long long' if <sys/types.h> does not define. */
+#undef int64_t
-/* debug define */
-#undef ABORTFP
+/* Define to `char' if <sys/types.h> does not define. */
+#undef int8_t
-/* debug define */
-#undef ABORTFP
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#undef size_t
-/* debug define */
-#undef ABORTFP
+/* Define to `unsigned short' if <sys/types.h> does not define. */
+#undef uint16_t
-/* alot of debug output */
-#undef DEBUG
+/* Define to `unsigned long' if <sys/types.h> does not define. */
+#undef uint32_t
-/* we're on DEC Alpha */
-#undef __DECALPHA__
+/* Define to `unsigned long long' if <sys/types.h> does not define. */
+#undef uint64_t
+/* Define to `unsigned char' if <sys/types.h> does not define. */
+#undef uint8_t
Index: configure
===================================================================
RCS file: /cvsroot/lame/lame/configure,v
retrieving revision 1.90
diff -u -r1.90 configure
--- configure 28 May 2002 08:28:50 -0000 1.90
+++ configure 29 May 2002 16:34:01 -0000
@@ -821,7 +821,6 @@
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
- --target=TARGET configure for building compilers for TARGET [HOST]
_ACEOF
fi
@@ -1313,34 +1312,6 @@
host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$as_me:$LINENO: checking target system type" >&5
-echo $ECHO_N "checking target system type... $ECHO_C" >&6
-if test "${ac_cv_target+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_target_alias=$target_alias
-test "x$ac_cv_target_alias" = "x" &&
- ac_cv_target_alias=$ac_cv_host_alias
-ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-echo "${ECHO_T}$ac_cv_target" >&6
-target=$ac_cv_target
-target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
# Find a good install program. We prefer a C program (faster),
@@ -2869,7 +2840,7 @@
case "$lt_target" in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 2872 "configure"' > conftest.$ac_ext
+ echo '#line 2843 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -4389,10 +4360,12 @@
+
for ac_header in \
errno.h \
fcntl.h \
limits.h \
+ stdint.h \
string.h \
sys/soundcard.h \
sys/time.h \
@@ -4967,7 +4940,7 @@
if test "${GCC}" = "yes"; then
echo "$as_me:$LINENO: checking version of GCC" >&5
echo $ECHO_N "checking version of GCC... $ECHO_C" >&6
- GCC_version=`${CC} --version`
+ GCC_version=`${CC} --version | sed -n '1s/^^ * (.*) //;s/ .*$//;1p`
echo "$as_me:$LINENO: result: ${GCC_version}" >&5
echo "${ECHO_T}${GCC_version}" >&6
fi
@@ -12386,7 +12359,14 @@
OPTIMIZATION="${OPTIMIZATION} -fdelayed-branch"
;;
esac
+ ;;
+ *)
+ # no special optimization for other versions
+ { echo "$as_me:$LINENO: WARNING: LAME doesn't know about your
+version of gcc" >&5
+echo "$as_me: WARNING: LAME doesn't know about your version of gcc" >&2;}
+ ;;
;;
+ esac
*)
{ { echo "$as_me:$LINENO: error: bad value �${CONFIG_EXPOPT}� for
expopt option" >&5
echo "$as_me: error: bad value �${CONFIG_EXPOPT}� for expopt option" >&2;}
@@ -13279,10 +13259,6 @@
s,@host_cpu@,$host_cpu,;t t
s,@host_vendor@,$host_vendor,;t t
s,@host_os@,$host_os,;t t
-s,@target@,$target,;t t
-s,@target_cpu@,$target_cpu,;t t
-s,@target_vendor@,$target_vendor,;t t
-s,@target_os@,$target_os,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
Index: configure.in
===================================================================
RCS file: /cvsroot/lame/lame/configure.in,v
retrieving revision 1.84
diff -u -r1.84 configure.in
--- configure.in 28 May 2002 08:07:00 -0000 1.84
+++ configure.in 29 May 2002 16:34:01 -0000
@@ -22,7 +22,7 @@
AC_CONFIG_SRCDIR([libmp3lame/lame.c])
dnl check system
-AC_CANONICAL_TARGET([])
+AC_CANONICAL_HOST([])
dnl automake
@@ -81,6 +81,7 @@
errno.h \
fcntl.h \
limits.h \
+ stdint.h \
string.h \
sys/soundcard.h \
sys/time.h \
@@ -96,7 +97,7 @@
if test "${GCC}" = "yes"; then
AC_MSG_CHECKING(version of GCC)
- GCC_version=`${CC} --version`
+ GCC_version=`${CC} --version | sed -n '1s/^[^ ]* (.*) //;s/ .*$//;1p`
AC_MSG_RESULT(${GCC_version})
fi
@@ -690,7 +691,13 @@
OPTIMIZATION="${OPTIMIZATION} -fdelayed-branch"
;;
esac
+ ;;
+ *)
+ # no special optimization for other versions
+ AC_MSG_WARN(LAME doesn't know about your version of gcc,
+please report it to [EMAIL PROTECTED] Please make sure you try the
+latest LAME version first!)
+ ;;
;;
+ esac
*)
AC_MSG_ERROR(bad value �${CONFIG_EXPOPT}� for expopt option)
;;
Index: libmp3lame/VbrTag.c
===================================================================
RCS file: /cvsroot/lame/lame/libmp3lame/VbrTag.c,v
retrieving revision 1.54
diff -u -r1.54 VbrTag.c
--- libmp3lame/VbrTag.c 26 Nov 2001 15:20:10 -0000 1.54
+++ libmp3lame/VbrTag.c 29 May 2002 16:34:09 -0000
@@ -40,6 +40,9 @@
#include <assert.h>
#include <stdlib.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
#include <string.h>
#ifdef WITH_DMALLOC
Index: libmp3lame/pcm.c
===================================================================
RCS file: /cvsroot/lame/lame/libmp3lame/pcm.c,v
retrieving revision 1.7
diff -u -r1.7 pcm.c
--- libmp3lame/pcm.c 17 Feb 2001 14:30:56 -0000 1.7
+++ libmp3lame/pcm.c 29 May 2002 16:34:09 -0000
@@ -27,6 +27,9 @@
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
#include <limits.h>
#include <math.h>
#include <memory.h>
Index: libmp3lame/pcm.h
===================================================================
RCS file: /cvsroot/lame/lame/libmp3lame/pcm.h,v
retrieving revision 1.6
diff -u -r1.6 pcm.h
--- libmp3lame/pcm.h 17 Feb 2001 14:30:56 -0000 1.6
+++ libmp3lame/pcm.h 29 May 2002 16:34:09 -0000
@@ -1,6 +1,9 @@
/*{{{ #defines */
#include <limits.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
#include "lame.h"
#include "util.h"