Commit 774c87d6 authored by Ron's avatar Ron

Don't rely on HAVE_STDINT_H et al. being defined

Not everyone who includes speex_config_types.h will have a test which
defines those, and if we've chosen to use the stdint types at configure
time then we know exactly which header(s) are available, so just choose
the best one then and generate the header to use it.

This fixes ef801201 for those users.
parent 78cce679
......@@ -308,6 +308,12 @@ AC_SUBST([USIZE16])
AC_SUBST([SIZE32])
AC_SUBST([USIZE32])
AS_IF([test "$ac_cv_header_stdint_h" = "yes"], [INCLUDE_STDINT="#include <stdint.h>"],
[test "$ac_cv_header_inttypes_h" = "yes"], [INCLUDE_STDINT="#include <inttypes.h>"],
[test "$ac_cv_header_sys_types_h" = "yes"], [INCLUDE_STDINT="#include <sys/types.h>"])
AC_SUBST([INCLUDE_STDINT])
AC_CONFIG_FILES([
Makefile libspeex/Makefile src/Makefile doc/Makefile Speex.spec
......
#ifndef __SPEEX_TYPES_H__
#define __SPEEX_TYPES_H__
#if defined HAVE_STDINT_H
# include <stdint.h>
#elif defined HAVE_INTTYPES_H
# include <inttypes.h>
#elif defined HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
@INCLUDE_STDINT@
typedef @SIZE16@ spx_int16_t;
typedef @USIZE16@ spx_uint16_t;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment