summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authoriive <iive@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-02-12 21:10:13 +0000
committeriive <iive@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-02-12 21:10:13 +0000
commit153b4a23f9cef041868ee670daab543be93f4f6a (patch)
tree7348c8da021f3cc577110486fd48dcb2d23b40f4 /configure
parentdf6f7b80c6fc76ae9aef684296e52ed4c8f69986 (diff)
downloadmpv-153b4a23f9cef041868ee670daab543be93f4f6a.tar.bz2
mpv-153b4a23f9cef041868ee670daab543be93f4f6a.tar.xz
Implement test for system byteswap.h header file.
The result of this check is required by libavutil library. If it is not defined the library would try to implement its own byte swapping routines in bswap.h . As the routines are with same names, if included, the system definition would replace the function names with the macros. The result can not be compiled and looks like this: # 42 "../libavutil/bswap.h" -static av_always_inline uint16_t bswap_16(uint16_t x) +static __attribute__((always_inline)) inline uint16_t (__extension__ ({ register unsigned short int __v, __x = (uint16_t x); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25989 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure b/configure
index cd33497fb8..756b67b04b 100755
--- a/configure
+++ b/configure
@@ -3008,6 +3008,21 @@ fi
echores "$_alloca"
+echocheck "byteswap.h"
+cat > $TMPC << EOF
+#include <byteswap.h>
+int main(void) { bswap_16(0); return 0; }
+EOF
+_byteswap_h=no
+cc_check && _byteswap_h=yes
+if cc_check ; then
+ _def_byteswap_h='#define HAVE_BYTESWAP_H 1'
+else
+ _def_byteswap_h='#undef HAVE_BYTESWAP_H'
+fi
+echores "$_byteswap_h"
+
+
echocheck "mman.h"
cat > $TMPC << EOF
#include <sys/types.h>
@@ -8024,6 +8039,9 @@ $_def_asmalign_pot
/* Define this if your system has the "alloca.h" header file */
$_def_alloca
+/* Define this if your system has the "byteswap.h" header file */
+$_def_byteswap_h
+
/* Define this if your system has the "sys/mman.h" header file */
$_def_mman
$_def_mman_has_map_failed