[x264-devel] configure: add QNX support
Mike Gorchak
git at videolan.org
Wed Feb 27 00:18:03 CET 2013
x264 | branch: master | Mike Gorchak <mike.gorchak.qnx at gmail.com> | Sat Feb 2 23:35:00 2013 -0800| [51a5976144d80d9dc178fcaba2da5224809ee6ba] | committer: Jason Garrett-Glaser
configure: add QNX support
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=51a5976144d80d9dc178fcaba2da5224809ee6ba
---
common/common.c | 2 ++
configure | 10 ++++++++++
x264.h | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/common/common.c b/common/common.c
index 0efe6d3..de6e9ff 100644
--- a/common/common.c
+++ b/common/common.c
@@ -563,6 +563,8 @@ static double x264_atof( const char *str, int *b_error )
}
#define atobool(str) ( name_was_bool = 1, x264_atobool( str, &b_error ) )
+#undef atoi
+#undef atof
#define atoi(str) x264_atoi( str, &b_error )
#define atof(str) x264_atof( str, &b_error )
diff --git a/configure b/configure
index 4d663aa..c974ba4 100755
--- a/configure
+++ b/configure
@@ -521,6 +521,13 @@ case $host_os in
fi
HAVE_GETOPT_LONG=0
;;
+ *qnx*)
+ SYS="QNX"
+ define HAVE_MALLOC_H
+ libm="-lm"
+ HAVE_GETOPT_LONG=0
+ CFLAGS="$CFLAGS -I\$(SRCPATH)/extras"
+ ;;
*)
die "Unknown system $host, edit the configure"
;;
@@ -772,6 +779,9 @@ if [ "$thread" = "auto" ]; then
thread="win32"
fi
;;
+ QNX)
+ cc_check pthread.h -lc && thread="posix" && libpthread="-lc"
+ ;;
*)
cc_check pthread.h -lpthread && thread="posix" && libpthread="-lpthread"
;;
diff --git a/x264.h b/x264.h
index 7f59a38..ff70817 100644
--- a/x264.h
+++ b/x264.h
@@ -28,7 +28,7 @@
#ifndef X264_X264_H
#define X264_X264_H
-#if !defined(_STDINT_H) && !defined(_STDINT_H_) && \
+#if !defined(_STDINT_H) && !defined(_STDINT_H_) && !defined(_STDINT_H_INCLUDED) &&\
!defined(_INTTYPES_H) && !defined(_INTTYPES_H_)
# ifdef _MSC_VER
# pragma message("You must include stdint.h or inttypes.h before x264.h")
More information about the x264-devel
mailing list