]> git.sesse.net Git - vlc/blobdiff - configure.in
* ./configure.in: fixed a typo that prevented compilation of the network
[vlc] / configure.in
index c1bc842dc770e8de17490a8ba19c364dcdd53cd9..df061ffb0e76e11ebb92d83b9cfdbb43aa2ad865 100644 (file)
@@ -114,7 +114,7 @@ case "x${target_os}" in
     save_CFLAGS="${save_CFLAGS} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CFLAGS="${save_CFLAGS}"
     vlc_LDFLAGS="${vlc_LDFLAGS} -lbe"
     plugins_LDFLAGS="${plugins_LDFLAGS} -nostart"
-    beos_LDFLAGS="${beos_LDFLAGS} -lbe -lgame -lroot -ltracker"
+    beos_LDFLAGS="${beos_LDFLAGS} -lbe -lgame -lroot -ltracker -lstdc++.r4"
     ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind"
     ;;
   x*)
@@ -147,10 +147,8 @@ AC_CHECK_FUNC(send,,[
     http_LDFLAGS="${http_LDFLAGS} -lsocket"
 )])
 AC_CHECK_FUNC(gethostbyname,,[
-  AC_CHECK_LIB(nsl,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lnsl")
-])
-AC_CHECK_FUNC(gethostbyname,,[
-  AC_CHECK_LIB(bind,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind")
+  AC_CHECK_LIB(nsl,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lnsl",[
+    AC_CHECK_LIB(bind,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind")])
 ])
 have_nanosleep=0
 AC_CHECK_FUNC(nanosleep,have_nanosleep=1,[
@@ -196,6 +194,7 @@ AC_CHECK_LIB(m,pow,
   imdct3dn_LDFLAGS="${imdct3dn_LDFLAGS} -lm"
   imdctsse_LDFLAGS="${imdctsse_LDFLAGS} -lm"
   i420_rgb_LDFLAGS="${i420_rgb_LDFLAGS} -lm"
+  faad_LDFLAGS="${faad_LDFLAGS} -lm"
 )
 
 dnl Check for pthreads - borrowed from XMMS
@@ -261,6 +260,9 @@ if test "x${x_libraries}" = "xNONE"; then
   x_libraries="/usr/X11R6/lib"
 fi
 
+dnl Build the gtk_main plugin?
+NEED_GTK_MAIN=no
+
 dnl Check for DPMS
 if test "x${SYS}" != "xmingw32"
 then
@@ -438,19 +440,26 @@ dnl
 dnl  default modules
 dnl
 BUILTINS="${BUILTINS}"
-PLUGINS="${PLUGINS} misc/dummy/dummy misc/null/null"
-PLUGINS="${PLUGINS} control/rc/rc misc/logger/logger access/file access/udp access/http misc/network/ipv4 misc/memcpy/memcpy"
+PLUGINS="${PLUGINS} misc/dummy/dummy misc/null"
+PLUGINS="${PLUGINS} control/rc/rc misc/logger/logger access/file misc/memcpy/memcpy"
 PLUGINS="${PLUGINS} demux/mpeg/es demux/mpeg/audio demux/mpeg/mpeg_system demux/mpeg/ps demux/mpeg/ts"
-PLUGINS="${PLUGINS} codec/mpeg_video/idct/idct codec/mpeg_video/idct/idctclassic codec/mpeg_video/motion/motion codec/mpeg_video/mpeg_video codec/spudec/spudec codec/spdif"
-#PLUGINS="${PLUGINS} codec/a52old/imdct/imdct codec/a52old/downmix/downmix codec/mpeg_audio/mpeg_audio codec/a52old/a52old codec/lpcm/lpcm"
+PLUGINS="${PLUGINS} codec/mpeg_video/idct/idct codec/mpeg_video/idct/idctclassic codec/mpeg_video/motion/motion codec/mpeg_video/mpeg_video codec/spudec/spudec codec/spdif codec/mpeg_audio/mpeg_audio"
+PLUGINS="${PLUGINS} codec/a52old/imdct/imdct codec/a52old/downmix/downmix codec/a52old/a52old"
+#PLUGINS="${PLUGINS} codec/lpcm/lpcm"
 PLUGINS="${PLUGINS} video_filter/deinterlace/deinterlace video_filter/invert video_filter/wall video_filter/transform video_filter/distort video_filter/clone video_filter/crop"
-PLUGINS="${PLUGINS} audio_filter/converter/float32tos16 audio_filter/converter/a52tospdif"
+PLUGINS="${PLUGINS} audio_filter/converter/float32tos16 audio_filter/converter/float32tos8 audio_filter/converter/float32tou16 audio_filter/converter/float32tou8 audio_filter/converter/a52tospdif audio_filter/converter/fixed32tofloat32 audio_filter/converter/fixed32tos16 audio_filter/converter/s16tofloat32"
 PLUGINS="${PLUGINS} audio_filter/resampler/trivial"
+PLUGINS="${PLUGINS} audio_filter/channel_mixer/trivial"
 PLUGINS="${PLUGINS} audio_mixer/trivial audio_mixer/spdif"
 PLUGINS="${PLUGINS} audio_output/file"
 #PLUGINS="${PLUGINS} visualization/scope/scope"
 PLUGINS="${PLUGINS} video_chroma/i420_rgb video_chroma/i420_yuy2 video_chroma/i422_yuy2 video_chroma/i420_ymga"
 
+dnl
+dnl  Network modules
+dnl
+NETWORK_MODULES="access/udp access/http access/rtp misc/network/ipv4"
+
 dnl
 dnl  Accelerated modules
 dnl
@@ -460,6 +469,11 @@ THREEDNOW_MODULES="misc/memcpy/memcpy3dn codec/a52old/imdct/imdct3dn codec/a52ol
 SSE_MODULES="codec/a52old/imdct/imdctsse codec/a52old/downmix/downmixsse"
 ALTIVEC_MODULES="codec/mpeg_video/idct/idctaltivec codec/mpeg_video/motion/motionaltivec misc/memcpy/memcpyaltivec"
 
+if test x$SYS != xbeos
+then
+  PLUGINS="${PLUGINS} ${NETWORK_MODULES}"
+fi
+
 AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
     [ac_cv_mmx_inline],
     [CFLAGS="${save_CFLAGS}"
@@ -713,7 +727,7 @@ then
   CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
   AC_CHECK_HEADERS(dvdread/dvd_reader.h, [
      AC_TRY_COMPILE([#include <dvdread/dvd_reader.h>],
-        [void foo() { int i=DVD_VIDEO_LB_LEN; }],[
+        [int foo() { return DVD_VIDEO_LB_LEN; }],[
           PLUGINS="${PLUGINS} access/dvdread/dvdread"
           dvdread_LDFLAGS="${dvdread_LDFLAGS} ${test_LDFLAGS} -ldvdread"
           dvdread_CFLAGS="${dvdread_CFLAGS} ${test_CFLAGS}"
@@ -1005,6 +1019,11 @@ then
   fi
 fi
 
+dnl
+dnl   libid3tag support
+dnl
+AC_CHECK_HEADERS(id3tag.h, [audio_LDFLAGS="${audio_LDFLAGS} -lz -lid3tag"])
+   
 dnl
 dnl  ffmpeg decoder plugin
 dnl
@@ -1048,7 +1067,7 @@ then
       dnl  Use a custom libffmpeg
       AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
       BUILTINS="${BUILTINS} codec/ffmpeg/ffmpeg"
-      ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} ${real_ffmpeg_tree}/libavcodec/libavcodec.a -lm"
+      ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} ${real_ffmpeg_tree}/libavcodec/libavcodec.a"
       ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I${real_ffmpeg_tree}/libavcodec"
     else
       dnl  The given libavcodec wasn't built
@@ -1057,10 +1076,10 @@ then
     fi
   else
     CFLAGS="${save_CFLAGS} ${ffmpeg_CFLAGS}"
-    LDFLAGS="${save_LDFLAGS} ${ffmpeg_LDFLAGS} -lm"
+    LDFLAGS="${save_LDFLAGS} ${ffmpeg_LDFLAGS}"
     AC_CHECK_LIB(avcodec, avcodec_init, [
       BUILTINS="${BUILTINS} codec/ffmpeg/ffmpeg"
-      ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lavcodec -lm" ],
+      ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lavcodec" ],
       [ AC_MSG_ERROR([Cannot find libavcodec library...]) ])
     LDFLAGS="${save_LDFLAGS}"
     CFLAGS="${save_CFLAGS}"
@@ -1081,7 +1100,7 @@ then
     faad_CFLAGS="${faad_CFLAGS} -I${with_faad}/include"
     faad_LDFLAGS="${faad_LDFLAGS} -L${with_faad}/lib"
   fi
-  faad_LDFLAGS="${faad_LDFLAGS} -lm"
+  faad_LDFLAGS="${faad_LDFLAGS}"
 
   AC_ARG_WITH(faad-tree, 
   [    --with-faad-tree=PATH faad tree for static linking])
@@ -1410,6 +1429,17 @@ AC_ARG_ENABLE(mga,
       PLUGINS="${PLUGINS} video_output/mga/mga video_output/mga/xmga"
     fi ])
 
+dnl
+dnl  SVGAlib module
+dnl
+AC_ARG_ENABLE(svgalib,
+  [  --enable-svgalib        SVGAlib support (default disabled)])
+if test "x${enable_svgalib}" = "xyes"
+then
+  PLUGINS="${PLUGINS} video_output/svgalib"
+  svgalib_LDFLAGS="${svgalib_LDFLAGS} -lvgagl -lvga"
+fi
+
 dnl
 dnl  GGI module
 dnl
@@ -1525,7 +1555,7 @@ AC_ARG_ENABLE(alsa,
      AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
      if test "x${have_alsa}" = "xtrue"
      then
-       #PLUGINS="${PLUGINS} audio_output/alsa"
+       PLUGINS="${PLUGINS} audio_output/alsa"
        alsa_LDFLAGS="${alsa_LDFLAGS} -lasound -lm -ldl"
      fi
    fi])
@@ -1580,8 +1610,8 @@ then
     then
       AC_MSG_ERROR([Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-gtk.])
     fi
-    gtk_CFLAGS="${gtk_CFLAGS} `${GTK_CONFIG} --cflags gtk`"
-    gtk_LDFLAGS="${gtk_LDFLAGS} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
+    gtk_CFLAGS="${gtk_CFLAGS} `${GTK_CONFIG} --cflags gtk gthread`"
+    gtk_LDFLAGS="${gtk_LDFLAGS} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
     # now look for the gtk.h header
     CPPFLAGS="${save_CPPFLAGS} ${gtk_CFLAGS}"
     ac_cv_gtk_headers=yes
@@ -1592,6 +1622,7 @@ then
     if test "x${ac_cv_gtk_headers}" = "xyes"
     then
       PLUGINS="${PLUGINS} gui/gtk/gtk"
+      NEED_GTK_MAIN=yes
       ALIASES="${ALIASES} gvlc"
     fi
     CPPFLAGS="${save_CPPFLAGS}"
@@ -1625,8 +1656,8 @@ then
     then
       AC_MSG_ERROR([Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-familiar.])
     fi
-    familiar_CFLAGS="${familiar_CFLAGS} `${GTK_CONFIG} --cflags gtk`"
-    familiar_LDFLAGS="${familiar_LDFLAGS} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
+    familiar_CFLAGS="${familiar_CFLAGS} `${GTK_CONFIG} --cflags gtk gthread`"
+    familiar_LDFLAGS="${familiar_LDFLAGS} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
     # now look for the gtk.h header
     CPPFLAGS="${save_CPPFLAGS} ${familiar_CFLAGS}"
     ac_cv_gtk_headers=yes
@@ -1637,6 +1668,7 @@ then
     if test "x${ac_cv_gtk_headers}" = "xyes"
     then
       PLUGINS="${PLUGINS} gui/familiar/familiar"
+      NEED_GTK_MAIN=yes
     fi
     CPPFLAGS="${save_CPPFLAGS}"
   fi
@@ -1659,6 +1691,7 @@ AC_ARG_ENABLE(gnome,
     CPPFLAGS="${save_CPPFLAGS} ${gnome_CFLAGS}"
     AC_CHECK_HEADERS(gnome.h, [
       PLUGINS="${PLUGINS} gui/gtk/gnome"
+      NEED_GTK_MAIN=yes
       ALIASES="${ALIASES} gnome-vlc"
      ],[
       AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
@@ -1784,6 +1817,9 @@ AC_ARG_ENABLE(xosd,
 if test "x${enable_xosd}" = "xyes"
 then
   AC_CHECK_HEADER(xosd.h, have_xosd="true", have_xosd="false")
+  AC_TRY_COMPILE([#include <xosd.h>],
+     [void foo() { xosd_init("foo","bar",12,XOSD_top,2,12,42); }],,
+      AC_DEFINE(HAVE_OLD_XOSD_H, 1, Define if <xosd.h> is pre-1.0.0))
   if test "x${have_xosd}" = "xtrue"
   then
     PLUGINS="${PLUGINS} visualization/xosd/xosd"
@@ -1949,6 +1985,16 @@ then
   fi
 fi
 
+dnl
+dnl  gtk_main plugin
+dnl
+if test "x${NEED_GTK_MAIN}" != "xno"
+then
+    PLUGINS="${PLUGINS} misc/gtk_main"
+    gtk_main_CFLAGS="${gtk_main_CFLAGS} ${gtk_CFLAGS} ${familiar_CFLAGS} ${gnome_CFLAGS}"
+    gtk_main_LDFLAGS="${gtk_main_LDFLAGS} ${gtk_LDFLAGS} ${familiar_LDFLAGS} ${gnome_LDFLAGS}"
+fi
+
 dnl
 dnl  Plug-ins - this must be AT THE END
 dnl
@@ -2047,6 +2093,7 @@ AC_SUBST(ffmpeg_CFLAGS)
 AC_SUBST(glide_CFLAGS)
 AC_SUBST(gnome_CFLAGS)
 AC_SUBST(gtk_CFLAGS)
+AC_SUBST(gtk_main_CFLAGS)
 AC_SUBST(kde_CFLAGS)
 AC_SUBST(idctaltivec_CFLAGS)
 AC_SUBST(macosx_CFLAGS)
@@ -2056,6 +2103,7 @@ AC_SUBST(motionaltivec_CFLAGS)
 AC_SUBST(qt_CFLAGS)
 AC_SUBST(qte_CFLAGS)
 AC_SUBST(sdl_CFLAGS)
+AC_SUBST(svgalib_CFLAGS)
 AC_SUBST(x11_CFLAGS)
 AC_SUBST(xvideo_CFLAGS)
 
@@ -2076,6 +2124,7 @@ AC_SUBST(dvd_LDFLAGS)
 AC_SUBST(dvdread_LDFLAGS)
 AC_SUBST(dvdplay_LDFLAGS)
 AC_SUBST(ts_dvbpsi_LDFLAGS)
+AC_SUBST(audio_LDFLAGS)
 AC_SUBST(esd_LDFLAGS)
 AC_SUBST(familiar_LDFLAGS)
 AC_SUBST(distort_LDFLAGS)
@@ -2086,6 +2135,7 @@ AC_SUBST(ggi_LDFLAGS)
 AC_SUBST(glide_LDFLAGS)
 AC_SUBST(gnome_LDFLAGS)
 AC_SUBST(gtk_LDFLAGS)
+AC_SUBST(gtk_main_LDFLAGS)
 AC_SUBST(http_LDFLAGS)
 AC_SUBST(idctaltivec_LDFLAGS)
 AC_SUBST(imdct_LDFLAGS)
@@ -2106,6 +2156,7 @@ AC_SUBST(qt_LDFLAGS)
 AC_SUBST(qte_LDFLAGS)
 AC_SUBST(rc_LDFLAGS)
 AC_SUBST(sdl_LDFLAGS)
+AC_SUBST(svgalib_LDFLAGS)
 AC_SUBST(vcd_LDFLAGS)
 AC_SUBST(vorbis_LDFLAGS)
 AC_SUBST(waveout_LDFLAGS)
@@ -2128,13 +2179,12 @@ debug mode            : ${DEBUG}
 release               : ${RELEASE}
 profiling             : ${PROFILING}
 need builtin getopt   : ${NEED_GETOPT}
-built-in modules      :${BUILTINS}
-plug-in modules       :${PLUGINS}
+modules               : (see Makefile.config)
 mozilla plugin        : ${MOZILLA}
 vlc aliases           :${ALIASES}
 
-You may now tune Makefile.opts at your convenience, for instance to choose
-which modules get compiled as plugins.
+You may now tune Makefile.config and Makefile.opts at your convenience, for
+instance to choose which modules get compiled as plugins, or tune CFLAGS.
 
 To build vlc and its plugins, type \`${VLC_MAKE}'.
 "