Make it possible to force a distro.mak to use. This is helpfull in cross-compile...
[vlc.git] / build-vlc
index dcee97c..e6aa06a 100755 (executable)
--- a/build-vlc
+++ b/build-vlc
 #!/bin/sh
 
 FEATURES="
 #!/bin/sh
 
 FEATURES="
-GNOME gnome
-GNOME2 gnome2
-GTK gtk
-GTK2 gtk2
-SKINS skins
-FAMILIAR familiar
-WXWINDOWS wxwindows
-QT qt
-KDE kde
+SKINS skins2
+PDA pda
+WXWIDGETS wxwidgets
 OPIE opie
 MACOSX macosx
 QNX qnx
 OPIE opie
 MACOSX macosx
 QNX qnx
-INTFWIN intfwin
 NCURSES ncurses
 XOSD xosd
 NCURSES ncurses
 XOSD xosd
-DVDOLD dvd
+VISUAL visual
+GOOM goom
+SLP slp
+LIRC lirc
+JOYSTICK joystick
+LIVEDOTCOM livedotcom
 DVDREAD dvdread
 DVDREAD dvdread
-DVDPLAY dvdplay
+DVDNAV dvdnav
+DSHOW dshow
 DVBPSI dvbpsi
 DVBPSI dvbpsi
-VCD vcd
 V4L v4l
 V4L v4l
-SAT satellite
+PVR pvr
+VCD vcd
+SATELLITE satellite
+DVB dvb
+OGG ogg
+MKV mkv
+MOD mod
+CDIO libcdio
+VCDX vcdx
+CDDAX cddax
+CDDB libcddb
 X11 x11
 XVIDEO xvideo
 X11 x11
 XVIDEO xvideo
-SDL sdl
+GLX glx
 FB fb
 FB fb
-DIRECTX directx
-WINGDI wingdi
+MGA mga
+SDL sdl
 FREETYPE freetype
 FREETYPE freetype
+FRIBIDI fribidi
+SVG svg
 QTE qte
 QTE qte
-MGA mga
+HD1000V hd1000v
+DIRECTX directx
+WINGDI wingdi
 SVGALIB svgalib
 GGI ggi
 GLIDE glide
 AA aa
 SVGALIB svgalib
 GGI ggi
 GLIDE glide
 AA aa
+CACA caca
 OSS oss
 ESD esd
 ARTS arts
 ALSA alsa
 WAVEOUT waveout
 COREAUDIO coreaudio
 OSS oss
 ESD esd
 ARTS arts
 ALSA alsa
 WAVEOUT waveout
 COREAUDIO coreaudio
-OGG ogg
-A52 a52
+HD1000A hd1000a
 MAD mad
 FFMPEG ffmpeg
 FAAD faad
 MAD mad
 FFMPEG ffmpeg
 FAAD faad
-XVID xvid
-DV dv
+QUICKTIME quicktime
+A52 a52
+DTS dts
 FLAC flac
 LIBMPEG2 libmpeg2
 VORBIS vorbis
 TREMOR tremor
 FLAC flac
 LIBMPEG2 libmpeg2
 VORBIS vorbis
 TREMOR tremor
+SPEEX speex
 TARKIN tarkin
 TARKIN tarkin
-THEORA theoea
-SOUT sout
+THEORA theora
+CMML cmml
+UTF8 utf8
+PTH pth
+ST st
+GPROF gprof
+CPROF cprof
+MOZILLA mozilla
+TESTSUITE testsuite
+OPTIMIZATIONS optimizations
+ALTIVEC altivec
 DEBUG debug
 DEBUG debug
+RELEASE release
+SOUT sout
+WITHFFMPEGMP3LAME ffmpeg-mp3lame
+WITHFFMPEGFAAC ffmpeg-faac
+GALAKTOS galaktos
+HTTPD httpd
+JACK jack
+QT4 qt4
 "
 PATHS="
 "
 PATHS="
-FFMPEG_TREE ffmpeg-tree
+WITHXML2CONFIGPATH xml2-config-path
+WITHWXCONFIGPATH wx-config-path
+WITHWXCONFIG wx-config
+WITHQTE qte
+WITHGOOMTREE goom-tree
+WITHSLP slp
+WITHLIVEDOTCOMTREE livedotcom-tree
+WITHDVDREAD dvdread
+WITHDVDREADTREEE dvdread-tree
+WITHDVDNAVCONFIGPATH dvdnav-config-path
+WITHDVBPSI dvbpsi
+WITHDVBPSITREE dvbpsi-tree
+WITHV4L v4l
+WITHDVB dvb
+WITHSDLCONFIGPATH sdl-config-path
+WITHSDLPREFIX sdl-prefix
+WITHFREETYPECONFIGPATH freetype-config-path
+WITHFRIBIDICONFIGPATH fribidi-config-path
+WITHQTE qte
+WITHDIRECTX directx
+WITHGGI ggi
+WITHGLIDE glide
+WITHCACACONFIGPATH caca-config-path
+WITHMAD mad
+WITHMADTREE mad-tree
+WITHFFMPEGTREE ffmpeg-tree
+WITHFAADTREE faad-tree
+WITHA52 a52
+WITHA52TREE a52-tree
+WITHDTSTREE dts-tree
+WITHLIBMPEG2TREE libmpeg2-tree
+WITHTARKINTREE tarkin-tree
+WITHMOZILLASDKPATH mozilla-sdk-path
+ENDIANNESS words
 "
 if [ ! -e .config ]
 then
    ./menuconfig
 fi
 
 "
 if [ ! -e .config ]
 then
    ./menuconfig
 fi
 
+if [ -e .cmd ]
+then
+   echo ".cmd still exist. Removing it."
+   rm -f .cmd
+fi
+
 echo -n "./configure " > .cmd
 echo -n "./configure " > .cmd
-source .config
+. ./.config
 
 check_features () {
 while [ -n "$1" ]
 do
    eval x="\$CONFIG_$1"
 
 check_features () {
 while [ -n "$1" ]
 do
    eval x="\$CONFIG_$1"
-   if [ "$x" == "y" ]
+   if [ "$x" = "y" ]
    then
    then
-      echo -n "--enable-$2 " >> .cmd
+      if [ "$1" = "WITHFFMPEGMP3LAME" ] || [ "$1" = "WITHFFMPEGFAAC" ]
+      then
+         echo -n "--with-$2 " >> .cmd
+      else
+         echo -n "--enable-$2 " >> .cmd
+      fi
    else
    else
-      echo -n "--disable-$2 " >> .cmd
+      if [ "$1" != "WITHFFMPEGMP3LAME" ] && [ "$1" != "WITHFFMPEGFAAC" ]
+      then
+         echo -n "--disable-$2 " >> .cmd
+      fi
    fi
    shift; shift
 done
    fi
    shift; shift
 done
@@ -89,7 +167,10 @@ do
    if [ -n $1 ]
    then
       eval x="\$CONFIG_$1"
    if [ -n $1 ]
    then
       eval x="\$CONFIG_$1"
-      echo -n "--with-$2=$x" >> .cmd
+      if [ "$x" != "" ]
+      then
+         echo -n "--with-$2=$x " >> .cmd
+      fi
    fi
    shift; shift
 done
    fi
    shift; shift
 done
@@ -98,11 +179,14 @@ done
 check_features $FEATURES
 check_paths $PATHS
 
 check_features $FEATURES
 check_paths $PATHS
 
+#XXX
+echo "--enable-maintainer-mode " >> .cmd
+
 if [ ! -e configure ]
 then
    ./bootstrap
 fi
 
 if [ ! -e configure ]
 then
    ./bootstrap
 fi
 
-source .cmd
+. ./.cmd
 make
 rm -f .cmd
 make
 rm -f .cmd