Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/speex.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon <ron@debian.org>2014-05-17 10:36:03 +0400
committerRon <ron@debian.org>2014-05-17 10:36:03 +0400
commit774c87d6cb7dd8dabdd17677fc6da753ecf4aa87 (patch)
treebae256e9eeb8f3e9d6b0f9bf092ea680b5229559
parent78cce679a0f2d376b97e64a6d7763bce82dd06cc (diff)
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 ef80120166c3a2552f77008f40c59a84577a36b5 for those users.
-rw-r--r--configure.ac6
-rw-r--r--include/speex/speex_config_types.h.in8
2 files changed, 7 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 07ebff2..9f8b996 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/include/speex/speex_config_types.h.in b/include/speex/speex_config_types.h.in
index 02b82fd..5ea7b55 100644
--- a/include/speex/speex_config_types.h.in
+++ b/include/speex/speex_config_types.h.in
@@ -1,13 +1,7 @@
#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;