]> git.sesse.net Git - vlc/blobdiff - configure.ac
Provide a default and work around gcc
[vlc] / configure.ac
index 7bb2b5dafe17f2628899d38a9e0d9de983fc8442..3922ec60f86396032a92bbdfbe99fa2acbe228c8 100644 (file)
@@ -352,7 +352,7 @@ case "${host_os}" in
         VLC_ADD_LIBS([libvlccore],[-lws2_32 -lnetapi32 -lwinmm])
         VLC_ADD_LDFLAGS([vlc],[-mwindows])
         VLC_ADD_LIBS([activex mozilla],[-lgdi32])
-        VLC_ADD_LIBS([cdda vcdx cddax sdl_image],[-lwinmm])
+        VLC_ADD_LIBS([cdda vcdx cddax sdl_image aout_sdl vout_sdl],[-lwinmm])
         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 stream_out_raop vod_rtsp access_realrtsp rtp telnet rc netsync gnutls growl_udp flac ts audioscrobbler lua remoteosd zvbi],[-lws2_32])
         VLC_ADD_LIBS([access_file], [-lshlwapi])
     fi
@@ -561,10 +561,10 @@ dnl Check for system libs needed
 need_libc=false
 
 dnl Check for usual libc functions
-AC_CHECK_FUNCS([gettimeofday isatty sigrelse getpwuid_r memalign posix_memalign if_nametoindex getenv putenv setenv ctime_r lrintf daemon fork lstat posix_fadvise posix_madvise uselocale])
+AC_CHECK_FUNCS([gettimeofday isatty sigrelse getpwuid_r memalign posix_memalign if_nametoindex getenv putenv setenv ctime_r daemon fork lstat posix_fadvise posix_madvise uselocale])
 AC_FUNC_ALLOCA
 AC_CHECK_FUNCS(fcntl)
-AC_REPLACE_FUNCS([asprintf atof atoll getcwd gmtime_r lldiv localtime_r rewind strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtoll vasprintf swab])
+AC_REPLACE_FUNCS([asprintf atof atoll getcwd getpid gmtime_r lldiv localtime_r rewind strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtoll vasprintf swab])
 AC_CHECK_FUNCS([stricmp strnicmp])
 AC_CHECK_FUNCS(fdatasync,,
   [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
@@ -732,11 +732,16 @@ AC_CHECK_LIB(m,exp,[
 AC_CHECK_LIB(m,round,[
   VLC_ADD_LIBS([dbus],[-lm])
 ])
-AC_CHECK_LIB(mx,sqrtf,[
-  VLC_ADD_LIBS([x264],[-lmx])
+AC_CHECK_LIB(m,sqrtf,[
+  VLC_ADD_LIBS([x264],[-lm])
 ])
 fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
 
+AC_CHECK_LIB(m,lrintf, [
+  AC_DEFINE(HAVE_LRINTF, 1, [Define to 1 if you have the lrintf function])
+  VLC_ADD_LIBS([skins2],[-lm])
+])
+
 dnl Check for dynamic plugins
 ac_cv_have_plugins=no
 
@@ -872,7 +877,7 @@ AC_CHECK_TYPE(ssize_t,, [
 
 dnl Check for poll
 AC_SEARCH_LIBS(poll, [poll], [AC_DEFINE(HAVE_POLL, 1, [Define to 1 if the OS is usabl... err, has poll().])], [
-if test ${SYS} != "mingw32"
+if test ${SYS} != "mingw32" -a ${SYS} != "mingwce"
 then
     AC_MSG_WARN([Your platform does not support poll(). VLC has it's own poll() implementation, but it is only intended to be used on Windows. VLC might crash or be insecure when you see this message. Either switch to an OS with a proper poll() implementation, or implement one for your OS in VLC])
 fi
@@ -1011,7 +1016,8 @@ AC_ARG_ENABLE(warnings-as-error,
 AS_IF([test "${enable_warnings_as_error}" = "yes"], [
     RDC_PROG_CC_WERRORFLAGS([unused-function unused-label unused-value unused-parameter unused-variable unused \
      missing-braces nonnull parentheses uninitialized address enum-compare undef comment switch \
-     bad-function-cast ignored])
+     bad-function-cast implicit sequence-point strict-aliasing array-bounds missing-parameter-type \
+     overflow int-to-pointer-cast pointer-to-int-cast div-by-zero overflow ignored])
 ])
 AC_SUBST(CFLAGS_WERROR)
 
@@ -1447,7 +1453,7 @@ AS_IF([test "${enable_sse}" != "no"], [
 AC_CACHE_CHECK([if $CC groks 3D Now! inline assembly],
     [ac_cv_3dnow_inline],
     [CFLAGS="${CFLAGS_save}"
-     AC_TRY_COMPILE(,[void *p = NULL; asm volatile("pfadd %%mm1,%%mm2"::"r"(p));],
+     AC_TRY_COMPILE(,[void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));],
                     ac_cv_3dnow_inline=yes, ac_cv_3dnow_inline=no)])
 AS_IF([test "${ac_cv_3dnow_inline}" != "no"], [
   AC_DEFINE(CAN_COMPILE_3DNOW, 1,
@@ -1730,7 +1736,19 @@ AM_CONDITIONAL(BUILD_HTTPD, [test "${enable_httpd}" != "no"])
 dnl
 dnl libproxy support
 dnl
-PKG_ENABLE_MODULES_VLC([LIBPROXY], [], [libproxy-1.0], [libproxy support], [auto])
+AC_ARG_ENABLE(libproxy,
+  [  --enable-libproxy       libproxy support (default auto)])
+AS_IF([test "${enable_libproxy}" != "no"], [
+  PKG_CHECK_MODULES(LIBPROXY, libproxy-1.0, [
+    AC_DEFINE(HAVE_LIBPROXY, 1, [Define if libproxy is available])
+    VLC_ADD_CFLAGS([access_http],[$LIBPROXY_CFLAGS])
+    VLC_ADD_LIBS([access_http],[$LIBPROXY_LIBS])
+  ], [
+    AS_IF([test "x${enable_libproxy}" != "x"], [
+      AC_MSG_ERROR([libproxy could not be found on your system])
+    ])
+  ])
+])
 
 
 dnl
@@ -2099,11 +2117,11 @@ then
         VLC_ADD_LIBS([opencv_example],[-L${with_opencv_tree}/lib -lcv -lcxcore -lcvaux -lhighgui])
         VLC_ADD_CXXFLAGS([opencv_example],[-I${with_opencv_tree}/cv/include -I${with_opencv_tree}/cxcore/include -I${with_opencv_tree}/cvaux/include -I${with_opencv_tree}/otherlibs/highgui])
         AC_LANG_POP(C++)
-         else
+      else
         dnl  No opencv could be found, sorry
         AC_MSG_RESULT(no)
         AC_MSG_ERROR([cannot find opencv in ${with_opencv_tree}])
-         fi
+      fi
     else
       PKG_CHECK_MODULES(OPENCV, opencv,
         [
@@ -2563,11 +2581,15 @@ dnl
 PKG_ENABLE_MODULES_VLC([OGG], [], [ogg >= 1.0], [Ogg demux support], [auto])
 if test "${enable_sout}" != "no"; then
     PKG_ENABLE_MODULES_VLC([MUX_OGG], [], [ogg >= 1.0], [Ogg demux support], [auto])
+else
+    AM_CONDITIONAL(HAVE_MUX_OGG, 0)
 fi
 
 if test "${enable_sout}" != "no"; then
 dnl Check for libshout
 PKG_ENABLE_MODULES_VLC([shout], [access_output_shout], [shout >= 2.1], [libshout output plugin], [auto])
+else
+    AM_CONDITIONAL(HAVE_shout, 0)
 fi
 
 dnl
@@ -3624,7 +3646,7 @@ then
   if test "${SDL_CONFIG}" != "no"
   then
     # SDL on Darwin is heavily patched and can only run SDL_image
-    if test "${SYS}" != "darwin" -a "${SYS}" != "mingw32"; then
+    if test "${SYS}" != "darwin"; then
       VLC_ADD_PLUGIN([vout_sdl])
       VLC_ADD_PLUGIN([aout_sdl])
     fi
@@ -3723,7 +3745,7 @@ fi
 dnl
 dnl  libxml2 module
 dnl
-PKG_ENABLE_MODULES_VLC([libxml2], [], [libxml-2.0 >= 2.5], [libxml2 support],[auto])
+PKG_ENABLE_MODULES_VLC([libxml2], [xml], [libxml-2.0 >= 2.5], [libxml2 support],[auto])
 
 dnl
 dnl  SVG module
@@ -4055,6 +4077,7 @@ dnl
 dnl  ALSA module
 dnl
 PKG_ENABLE_MODULES_VLC([ALSA], [], [alsa >= 1.0.0], [Alsa sound support for linux], [auto])
+PKG_ENABLE_MODULES_VLC([ACCESS_ALSA], [access_alsa], [alsa >= 1.0.0], [Alsa access for linux], [auto])
 
 dnl
 dnl  win32 waveOut plugin
@@ -5199,7 +5222,6 @@ AC_CONFIG_FILES([
   modules/stream_out/Makefile
   modules/video_chroma/Makefile
   modules/video_filter/Makefile
-  modules/video_filter/atmo/Makefile
   modules/video_filter/dynamicoverlay/Makefile
   modules/video_output/Makefile
   modules/video_output/msw/Makefile