aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2009-10-28 20:19:15 +0000
committerMåns Rullgård <mans@mansr.com>2009-10-28 20:19:15 +0000
commitf0125de9d12dcae05a6eefee04c10bef327de288 (patch)
tree181860612a7b0aa9f27484fab4623dc6eb3d21eb /configure
parent3db0208c42c1d76537b138bd6ab3f390fcb5e821 (diff)
downloadffmpeg-f0125de9d12dcae05a6eefee04c10bef327de288.tar.gz
configure: add C99 flags to HOSTCFLAGS
Originally committed as revision 20408 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure18
1 files changed, 17 insertions, 1 deletions
diff --git a/configure b/configure
index 1eb3ba95ff..b221bcc63c 100755
--- a/configure
+++ b/configure
@@ -778,6 +778,20 @@ check_foo_config(){
return $err
}
+check_host_cc(){
+ log check_host_cc "$@"
+ cat > $TMPC
+ log_file $TMPC
+ check_cmd $host_cc $host_cflags "$@" -c -o $TMPO $TMPC
+}
+
+check_host_cflags(){
+ log check_host_cflags "$@"
+ check_host_cc "$@" <<EOF && append host_cflags "$@"
+int x;
+EOF
+}
+
apply(){
file=$1
shift
@@ -1312,7 +1326,7 @@ LIB_INSTALL_EXTRA_CMD='$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
CC_O='-o $@'
-host_cflags='-O3 -g -Wall'
+host_cflags='-D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -O3 -g -Wall'
host_libs='-lm'
target_path='.'
@@ -1765,6 +1779,8 @@ check_cc -D_LARGEFILE_SOURCE <<EOF && add_cppflags -D_LARGEFILE_SOURCE
#include <stdlib.h>
EOF
+check_host_cflags -std=c99
+
case "$arch" in
alpha)
arch="alpha"