]> git.sesse.net Git - ffmpeg/blobdiff - configure
Sightly simplify initialization of int start.
[ffmpeg] / configure
index fb78be48c5b4ff54db0072bceec20acfea8d8786..032fd5b4a58106feffc6d28fa98cb4d5c091f3a8 100755 (executable)
--- a/configure
+++ b/configure
@@ -963,14 +963,18 @@ ARCH_EXT_LIST='
     vis
 '
 
+HAVE_LIST_PUB='
+    bigendian
+'
+
 HAVE_LIST="
     $ARCH_EXT_LIST
+    $HAVE_LIST_PUB
     $THREADS_LIST
     alsa_asoundlib_h
     altivec_h
     arpa_inet_h
     attribute_packed
-    bigendian
     bswap
     closesocket
     cmov
@@ -2219,7 +2223,7 @@ enabled pic && enable_pic
 check_cc <<EOF || die "Symbol mangling check failed."
 int ff_extern;
 EOF
-sym=$($nm -P -g $TMPO | grep ff_extern)
+sym=$($nm -g $TMPO | awk '/ff_extern/{ print substr($0, match($0, /[^ \t]*ff_extern/)) }')
 extern_prefix=${sym%%ff_extern*}
 
 check_cc <<EOF && enable inline_asm
@@ -2240,7 +2244,7 @@ EOF
 check_cc <<EOF || die "endian test failed"
 unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
 EOF
-od -A n -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
+od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
 
 if enabled alpha; then
 
@@ -2495,7 +2499,7 @@ texi2html -version > /dev/null 2>&1 && enable texi2html || disable texi2html
 if enabled network; then
     check_type "sys/types.h sys/socket.h" socklen_t
     check_type netdb.h "struct addrinfo"
-    check_type sys/socket.h "struct sockaddr_storage"
+    check_type "sys/types.h sys/socket.h" "struct sockaddr_storage"
     # Prefer arpa/inet.h over winsock2
     if check_header arpa/inet.h ; then
         check_func closesocket
@@ -2955,6 +2959,18 @@ echo "endif # FFMPEG_CONFIG_MAK" >> config.mak
 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
 cp_if_changed $TMPH config.h
 
+cat > $TMPH <<EOF
+/* Generated by ffconf */
+#ifndef AVUTIL_AVCONFIG_H
+#define AVUTIL_AVCONFIG_H
+EOF
+
+print_config AV_HAVE_ $TMPH /dev/null $HAVE_LIST_PUB
+
+echo "#endif /* AVUTIL_AVCONFIG_H */" >> $TMPH
+
+cp_if_changed $TMPH libavutil/avconfig.h
+
 # build pkg-config files
 
 pkgconfig_generate(){