]> git.sesse.net Git - vlc/blobdiff - configure.ac
Remove wrong check for img_resample() when ffmpeg is built with libswscale. img_resam...
[vlc] / configure.ac
index b0adb3d76aa9381b2ef888e7f6eaf29a0c880c36..1e7652ef75f9294f29a5d56fa007fa7ca71706a6 100644 (file)
@@ -313,7 +313,7 @@ case "${host_os}" in
         VLC_ADD_LDFLAGS([vlc],[-mwindows])
         VLC_ADD_LIBS([activex mozilla],[-lgdi32])
         VLC_ADD_LIBS([cdda vcdx cddax sdl_image],[-lwinmm])
-        VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_shout sap slp http stream_out_standard stream_out_rtp vod_rtsp access_realrtsp telnet rc netsync gnutls growl_udp flac ts audioscrobbler lua],[-lws2_32])
+        VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_shout access_output_rtmp sap slp http stream_out_standard stream_out_rtp vod_rtsp access_realrtsp telnet rc netsync gnutls growl_udp flac ts audioscrobbler lua],[-lws2_32])
     fi
     if test "${SYS}" = "mingwce"; then
         # add ws2 for closesocket, select, recv
@@ -1270,7 +1270,6 @@ AC_LANG_POP(C++)
 if test "${SYS}" != "mingwce"; then
   VLC_ADD_PLUGIN([gestures])
   VLC_ADD_PLUGIN([rc])
-  VLC_ADD_PLUGIN([telnet])
   VLC_ADD_PLUGIN([hotkeys])
   VLC_ADD_PLUGIN([showintf])
   VLC_ADD_PLUGIN([marq])
@@ -1759,11 +1758,15 @@ dnl
 dnl VideoLAN manager
 dnl
 AC_ARG_ENABLE(vlm,
-  [  --enable-vlm            VideoLAN manager (default enabled)])
-if test "${enable_vlm}" != "no"
-then
-  AC_DEFINE(ENABLE_VLM, 1, Define if you want the VideoLAN manager support)
-fi
+  [  --enable-vlm            VideoLAN manager (default enabled)],,
+  [enable_vlm="${enable_sout}"])
+AS_IF([test "${enable_vlm}" != "no"], [
+  AS_IF([test "${enable_sout}" = "no"], [
+    AC_MSG_ERROR([VLM requires the stream output. Do not use --disable-sout.])
+  ])
+  AC_DEFINE(ENABLE_VLM, 1, [Define if you want the VideoLAN manager support])
+  VLC_ADD_PLUGIN([telnet])
+])
 
 dnl
 dnl Growl notification plugin
@@ -3001,7 +3004,7 @@ dnl Trying with pkg-config
      PKG_CHECK_MODULES(POSTPROC, libpostproc,[
        VLC_ADD_CFLAGS([ffmpeg],[${POSTPROC_CFLAGS}]) 
        VLC_ADD_LIBS([ffmpeg],[${POSTPROC_LIBS}]) 
-       ],[ true ])
+       ])
      CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}"
      CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}"
      AC_CHECK_HEADERS(postproc/postprocess.h)
@@ -3018,14 +3021,12 @@ dnl Trying with pkg-config
        VLC_ADD_LIBS([ffmpeg],[${SWSCALE_LIBS}])
        AC_CHECK_LIB(swscale, sws_getContext,
          [AC_CHECK_HEADERS([ffmpeg/swscale.h libswscale/swscale.h])],
-         [AC_CHECK_LIB(avcodec,img_resample,[],
-            [AC_MSG_ERROR([Your FFmpeg library doesn't have the needed img_resample() function. You should rebuild it with software scaler disabled, or install the swscale headers.])],
+         [],
          [${SWSCALE_LIBS}])
-       ])
      VLC_RESTORE_FLAGS
     ],[AC_CHECK_LIB(avcodec,img_resample,[],
         [AC_MSG_ERROR([Your FFmpeg library doesn't have the needed img_resample() function. You should rebuild it with software scaler disabled, or install the swscale headers.])],
-        [${SWSCALE_LIBS}])
+        [${FFMPEG_LIBS}])
       ]
     )
 
@@ -3071,7 +3072,8 @@ dnl Trying with pkg-config
         [-lavcodec $LDAVUTIL])
       LDFLAGS="${LDFLAGS_save}"
       CPPFLAGS="${CPPFLAGS_save}"
-    ])
+      ],
+      [${SWSCALE_LIBS}])
   ])
 fi
 
@@ -5595,63 +5597,15 @@ then
 fi
 
 dnl
-dnl  Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
-dnl
-dnl  We give the user the opportunity to specify
-dnl  --with-words=big or --with-words=little ; otherwise, try to guess
+dnl  Endianness check
 dnl
-AC_ARG_WITH(words,
-  [    --with-words=endianness set endianness (big or little)])
-  case "${with_words}" in
-    big)
-      ac_cv_c_bigendian=yes
-      ;;
-    little)
-      ac_cv_c_bigendian=no
-      ;;
-    *)
-      dnl  Try to guess endianness by matching patterns on a compiled
-      dnl  binary, by looking for an ASCII or EBCDIC string
-      AC_CACHE_CHECK([whether the byte order is big-endian],
-        [ac_cv_c_bigendian],
-        [ac_cv_c_bigendian="unknown"
-        [cat >conftest.c <<EOF
-        short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
-        short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
-        void _a(void) { char*s = (char*)am; s = (char *)ai; }
-        short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
-        short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
-        void _e(void) { char*s = (char*)em; s = (char*)ei; }
-        int main(void) { _a(); _e(); return 0; }
-EOF
-        ]
-        if test -f conftest.c
-        then
-          if ${CC-cc} -c conftest.c -o conftest.o >>config.log 2>&1 \
-              && test -f conftest.o
-          then
-            if test "`strings conftest.o | grep BIGenDianSyS`"
-            then
-              ac_cv_c_bigendian="yes"
-            fi
-            if test "`strings conftest.o | grep LiTTleEnDian`"
-            then
-              ac_cv_c_bigendian="no"
-            fi
-          fi
-        fi
-      ])
-      if test "${ac_cv_c_bigendian}" = "unknown"
-      then
-        AC_MSG_ERROR([Could not guess endianness, please use --with-words])
-      fi
-      ;;
-  esac
-dnl  Now we know what to use for endianness, just put it in the header
-if test "${ac_cv_c_bigendian}" = "yes"
-then
-  AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system)
-fi
+AC_C_BIGENDIAN
+AS_IF([test "${ac_cv_c_bigendian}" = "yes"], [
+  DEFS_BIGENDIAN="-DWORDS_BIGENDIAN=1"
+], [
+  DEFS_BIGENDIAN=""
+])
+AC_SUBST(DEFS_BIGENDIAN)
 
 dnl
 dnl  DLL loader copied from MPlayer copied from somewhere else (WINE ?)