]> git.sesse.net Git - vlc/blobdiff - configure.ac
* strtof is C99 and not present on pre BSD 5 (including older Mac OSX).
[vlc] / configure.ac
index b5ca20b5418c4f77ad990ece12ffabb2ad8a528e..ff0ae00dbd9a769e815b3d0c84647f18a2debcaf 100644 (file)
@@ -120,6 +120,7 @@ case "${target_os}" in
     OBJCFLAGS_save="${OBJCFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; OBJCFLAGS="${OBJCFLAGS_save}"
     VLC_ADD_LDFLAGS([vlc ffmpeg],[-all_load])
     VLC_ADD_LDFLAGS([mp4], [-framework IOKit -framework CoreFoundation])
+    VLC_ADD_CFLAGS([libvlc],[-x objective-c])
     VLC_ADD_LDFLAGS([vlc],[-Wl,-multiply_defined,suppress])
     ;;
   *mingw32* | *cygwin*)
@@ -284,7 +285,7 @@ CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcd
 dnl Check for system libs needed
 need_libc=false
 
-AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf asprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf)
+AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol strtof isatty vasprintf asprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf)
 
 dnl Check for usual libc functions
 AC_CHECK_FUNCS(strdup strndup atof lseek)
@@ -342,6 +343,52 @@ if test "${ac_cv_type_socklen_t}" != "no"; then
   AC_DEFINE(HAVE_SOCKLEN_T, 1, [Define if <sys/socket.h> defines socklen_t.])
 fi
 
+dnl Check for struct sockaddr_storage
+AH_TEMPLATE(sockaddr_storage, [Define to `sockaddr' if <sys/socket.h> does not define.])
+AH_TEMPLATE(ss_family, [Define to `sa_family' if <sys/socket.h> does not define.])
+AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_struct_sockaddr_storage,
+  [AC_TRY_COMPILE(
+    [#include <sys/types.h>
+     #if defined( UNDER_CE )
+     # include <winsock.h>
+     #elif defined( WIN32 )
+     # include <winsock2.h>
+     #else
+     # include <sys/socket.h>
+     #endif], [struct sockaddr_storage addr;],
+     ac_cv_struct_sockaddr_storage=yes,
+     ac_cv_struct_sockaddr_storage=no)])
+if test $ac_cv_struct_sockaddr_storage = no; then
+  AC_DEFINE(sockaddr_storage, sockaddr)
+  AC_DEFINE(ss_family, sa_family)
+fi
+
+dnl getnameinfo, which implies {get,free}addrinfo, but not gai_strerror,
+dnl -lws2_32 required with Mingw32, -lresolv NOT needed on Solaris.
+dnl AC_SEARCH_LIBS won't work with Mingw32
+AH_TEMPLATE(HAVE_GETNAMEINFO,
+  [Define to 1 if you have the `getnameinfo' function.])
+ac_func_getnameinfo_save_LIBS=$LIBS
+AS_IF([test "${SYS}" = "mingw32"],
+  [LIBS="-lws2_32 $LIBS"])
+  AC_CACHE_CHECK([for getnameinfo], ac_cv_func_getnameinfo,
+[AC_LINK_IFELSE([AC_LANG_PROGRAM([
+[#include <sys/types.h>
+#if defined( UNDER_CE )
+# include <winsock.h>
+#elif defined( WIN32 )
+# include <winsock2.h>
+#else
+# include <sys/socket.h>
+# include <netdb.h>
+#endif]
+], [[getnameinfo(0,0,0,0,0,0,0);]])],
+ac_cv_func_getnameinfo=yes,
+ac_cv_func_getnameinfo=no)])
+AS_IF([test $ac_cv_func_getnameinfo = yes],
+  [AC_DEFINE(HAVE_GETNAMEINFO)])
+LIBS=$ac_func_getnameinfo_save_LIBS
+
 dnl Check for va_copy
 AC_CACHE_CHECK([for va_copy], ac_cv_c_va_copy,
   AC_TRY_LINK(
@@ -388,10 +435,10 @@ AC_CHECK_LIB(m,cos,[
   VLC_ADD_LDFLAGS([adjust distort a52tofloat32 dtstofloat32],[-lm])
 ])
 AC_CHECK_LIB(m,pow,[
-  VLC_ADD_LDFLAGS([ffmpeg stream_out_transcode stream_out_transrate i420_rgb faad vlc],[-lm])
+  VLC_ADD_LDFLAGS([ffmpeg stream_out_transcode stream_out_transrate i420_rgb faad equalizer vlc],[-lm])
 ])
 AC_CHECK_LIB(m,sqrt,[
-  VLC_ADD_LDFLAGS([headphone_channel_mixer],[-lm])
+  VLC_ADD_LDFLAGS([headphone_channel_mixer normvol],[-lm])
 ])
 fi # end "${SYS}" != "mingw32"
 
@@ -889,14 +936,14 @@ dnl
 dnl  default modules
 dnl
 VLC_ADD_PLUGINS([dummy rc telnet logger gestures memcpy hotkeys netsync])
-VLC_ADD_PLUGINS([mpgv mpga m4v h264 ps pva avi asf aac mp4 rawdv nsv real aiff mjpeg])
+VLC_ADD_PLUGINS([mpgv mpga m4v h264 ps pva avi asf aac mp4 rawdv nsv real aiff mjpeg demuxdump])
 VLC_ADD_PLUGINS([cvdsub svcdsub spudec dvbsub mpeg_audio lpcm a52 dts cinepak])
 VLC_ADD_PLUGINS([deinterlace invert adjust wall transform distort clone crop motionblur])
 VLC_ADD_PLUGINS([float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif dtstospdif fixed32tofloat32 fixed32tos16 s16tofixed32 s16tofloat32 s16tofloat32swab s8tofloat32 u8tofixed32 u8tofloat32])
 VLC_ADD_PLUGINS([trivial_resampler ugly_resampler linear_resampler bandlimited_resampler])
 VLC_ADD_PLUGINS([trivial_channel_mixer headphone_channel_mixer])
 VLC_ADD_PLUGINS([trivial_mixer spdif_mixer float32_mixer])
-VLC_ADD_PLUGINS([aout_file])
+VLC_ADD_PLUGINS([aout_file equalizer])
 VLC_ADD_PLUGINS([i420_rgb i420_yuy2 i422_yuy2 i420_ymga])
 VLC_ADD_PLUGINS([m3u id3 playlist export sgimb])
 VLC_ADD_PLUGINS([rawvideo])
@@ -921,6 +968,8 @@ if test "${SYS}" != "mingw32"; then
     VLC_ADD_PLUGINS([screensaver])
 else
     VLC_ADD_PLUGINS([ntservice])
+    VLC_ADD_PLUGINS([dmo])
+    VLC_ADD_LDFLAGS([dmo],[-lole32])
 fi
 
 dnl
@@ -1116,7 +1165,7 @@ AC_ARG_ENABLE(sout,
 if test "${enable_sout}" != "no"
 then
   VLC_ADD_PLUGINS([access_output_dummy access_output_udp access_output_file access_output_http])
-  VLC_ADD_PLUGINS([mux_ps mux_avi mux_mp4 mux_asf mux_dummy])
+  VLC_ADD_PLUGINS([mux_ps mux_avi mux_mp4 mux_asf mux_dummy mux_wav mux_mpjpeg])
   VLC_ADD_PLUGINS([packetizer_mpegvideo packetizer_h264])
   VLC_ADD_PLUGINS([packetizer_mpeg4video packetizer_mpeg4audio])
   VLC_ADD_PLUGINS([packetizer_copy])
@@ -1219,6 +1268,12 @@ then
   [    --with-dvdread=PATH    libdvdread headers and libraries])
   AC_ARG_WITH(dvdread-tree,
   [    --with-dvdread-tree=PATH libdvdread tree for static linking])
+
+  dnl Temporary hack (yeah, sure ;)
+  if test "${SYS}" = "mingw32" || test "${SYS}" = "darwin"; then
+      VLC_ADD_LDFLAGS([dvdread],[-ldvdcss])
+  fi
+
   if test -z "${with_dvdread}"
   then
     if test -z "${with_dvdread_tree}"
@@ -1229,7 +1284,6 @@ then
         ],[
           if test -n "${enable_dvdread}"
           then
-            AC_MSG_WARN([Please get libdvdread from http://www.dtek.chalmers.se/groups/dvd/downloads.shtml])
             AC_MSG_ERROR([cannot find libdvdread headers])
           fi
         ])
@@ -2503,7 +2557,7 @@ dnl
 dnl  SVG module
 dnl
 AC_ARG_ENABLE(svg,
-  [  --enable-svg       SVG support (default disabled)])
+  [  --enable-svg            SVG support (default disabled)])
 if test "${enable_svg}" == "yes"
 then
   PKG_CHECK_MODULES(SVG, 
@@ -3312,12 +3366,23 @@ dnl
 dnl Visualisation plugin
 dnl
 AC_ARG_ENABLE(visual,
-  [  --enable-visual          visualisation plugin (default enabled)])
+  [  --enable-visual         visualisation plugin (default enabled)])
 if test "${enable_visual}" != "no"
 then
     VLC_ADD_PLUGINS([visual])
 fi
 
+dnl
+dnl OpenGL visualisation plugin
+dnl
+AC_ARG_ENABLE(galaktos,
+  [  --enable-galaktos       OpenGL visualisation plugin (default disabled)])
+if test "${enable_galaktos}" = "yes"
+then
+    VLC_ADD_PLUGINS([galaktos])
+    VLC_ADD_LDFLAGS([galaktos],[-lGL -lGLU])
+fi
+
 dnl
 dnl  goom visualization plugin
 dnl
@@ -3535,8 +3600,10 @@ then
   else
     if test "${SYS}" != "mingw32"; then
       LDFLAGS="${LDFLAGS_save} -L${x_libraries}"
-      AC_CHECK_LIB(Xt,XtStrings,[
-        VLC_ADD_LDFLAGS([mozilla],[-L${x_libraries} -lXt])
+      AC_CHECK_LIB(Xt,XtStrings,
+       [VLC_ADD_LDFLAGS([mozilla],[-L${x_libraries} -lXt -lX11 -lSM -lICE])],
+       [],
+       [[-L${x_libraries} -lX11 -lSM -lICE]
       ])
       LDFLAGS="${LDFLAGS_save}"
     fi
@@ -3782,6 +3849,7 @@ AC_CONFIG_FILES([
   modules/audio_output/Makefile
   modules/codec/Makefile
   modules/codec/cmml/Makefile
+  modules/codec/dmo/Makefile
   modules/codec/ffmpeg/Makefile
   modules/codec/ffmpeg/postprocessing/Makefile
   modules/codec/ogt/Makefile
@@ -3826,6 +3894,7 @@ AC_CONFIG_FILES([
   modules/video_output/x11/Makefile
   modules/visualization/Makefile
   modules/visualization/visual/Makefile
+  modules/visualization/galaktos/Makefile
 ])
 
 AC_CONFIG_FILES([vlc-config], [chmod 0755 vlc-config])