diff options
author | Andres Mejia <mcitadel@gmail.com> | 2010-10-29 15:19:40 -0400 |
---|---|---|
committer | Andres Mejia <mcitadel@gmail.com> | 2010-10-29 15:19:40 -0400 |
commit | 03d99022dab1c9065fcad071c359e5b47b0d84f9 (patch) | |
tree | 3193c0d5804f795ee21a5e9912f54382bdaac30d /configure | |
parent | eb6c707a2570e9e1c1f48742d78e7e497b28fd93 (diff) |
Imported Upstream version 0.4.5+svn2210
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 890 |
1 files changed, 712 insertions, 178 deletions
@@ -12,6 +12,15 @@ else TMPDIR1="/tmp" fi +#thanks to ffmpeg for this +for v in "$@"; do + r="${v#*=}" + l="${v%$r}" + test "$r" = "${r#* }" || r="'$r'" + GPAC_CONFIGURATION="${GPAC_CONFIGURATION# } ${l}${r}" +done + + TMPC="${TMPDIR1}/gpac-conf-${RANDOM}-$$-${RANDOM}.c" TMPH="${TMPDIR1}/gpac-conf-${RANDOM}-$$-${RANDOM}.h" TMPCPP="${TMPDIR1}/gpac-conf-${RANDOM}-$$-${RANDOM}.cpp" @@ -28,10 +37,14 @@ dxsdk_path="" moz_path="local" cc_orig="gcc" cc="${cc_orig}" +cpp_orig="g++" +cpp="${cpp_orig}" ar="ar" ranlib="ranlib" make="make" strip="strip" +install="${INSTALL:=install}" +instflags="${INSTFLAGS:=-p}" cpu=`uname -m` debuginfo="no" sdl_path="" @@ -44,8 +57,6 @@ libdir="lib" #GPAC module config js_flags="XP_UNIX" js_lib="-ljs" -iso_fragments="yes" -make_readonly="no" has_mingw_directx="no" has_js="no" has_ft="no" @@ -69,12 +80,11 @@ has_jack="no" has_x11="no" has_x11_shm="no" has_x11_xv="no" -disable_svg="no" no_gcc_opt="no" use_fixed_point="no" use_memory_tracking="no" +use_std_alloc="no" has_opengl="no" -disable_opengl="no" has_tinygl="no" enable_tinygl="no" has_ssl="no" @@ -82,12 +92,48 @@ has_ipv6="no" has_dvb4linux="no" has_xmlrpc="no" has_openjpeg="no" +has_libxml2="no" gprof_build="no" -PIC_CFLAGS="" +static_build="no" want_pic="no" has_joystick="no" has_xul="no" enable_joystick="no" +static_mp4box="no" +disable_3d="no" +disable_svg="no" +disable_vrml="no" +disable_x3d="no" +disable_od="no" +disable_bifs="no" +disable_bifs_enc="no" +disable_laser="no" +disable_beng="no" +disable_qtvr="no" +disable_avi="no" +disable_m2ps="no" +disable_m2ts="no" +disable_m2ts_mux="no" +disable_ogg="no" +disable_parsers="no" +disable_import="no" +disable_export="no" +disable_swf="no" +disable_scene_stats="no" +disable_scene_dump="no" +disable_scene_encode="no" +disable_loader_isoff="no" +disable_loader_bt="no" +disable_loader_xmt="no" +disable_od_dump="no" +disable_mcrypt="no" +disable_isoff="no" +disable_isoff_write="no" +disable_isoff_frag="no" +disable_isoff_hint="no" +disable_isoff_frag="no" +disable_streaming="no" +enable_depth_compositor="no" enable_renoir="no" win32="no" @@ -96,13 +142,13 @@ cygwin="no" linux="no" freebsd="no" darwin="no" +sunos="no" alt_macosx_dir="" Mac_Applications="" extralibs="-lm" bigendian="no" SHFLAGS=-shared need_inet_aton="no" -LDFLAGS="$LDFLAGS -Wl --warn-common" CFLAGS="" CPPFLAGS="" GPAC_SH_FLAGS=-lpthread @@ -128,7 +174,8 @@ echo " --mandir=DIR man documentation in DIR [PREFIX/man]" echo "" echo " --source-path=PATH path of source code [$source_path]" echo " --cross_prefix=PREFIX use PREFIX for compile tools [$cross_prefix]" -echo " --cc=CC use C compiler CC [$cc]" +echo " --cc =CC use C compiler CC [$cc]" +echo " --cpp=CPP use C++ compiler CPP [$cpp]" echo " --make=MAKE use specified make [$make]" echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]" echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]" @@ -145,28 +192,60 @@ echo " --enable-debug produce debug version" echo " --enable-gprof enable profiling" echo " --enable-pic enable Position Independant Code for shared objects" echo " --strip enable strip" +echo " --std-allocator uses standard lib memory allocator" echo " --track-memory enable tracking of all memory allocated by gpac" -echo " --disable-fragments disable movie fragments in ISO media support" echo " --disable-opt disable GCC optimizations" echo " --disable-ipv6 disable IPV6 support" echo " --disable-wx disable wxWidgets support" echo " --disable-oss-audio disable OSS audio" echo " --disable-x11-shm disable X11 shared memory support" echo " --disable-x11-xv disable X11 Xvideo support" -echo " --disable-fragments disable movie fragments in ISO media support" -echo " --enable-readonly force ISO media to be read-only" -echo " --disable-svg disable SVG support" -echo " --enable-fixed-point enable fixed-point math (THIS MODIFIES GPAC MATH.H HEADER)" +echo " --enable-fixed-point enable fixed-point math" echo " --force-fixed-point force fixed-point math without changing gpac math.h header" -echo " --disable-opengl disable OpenGL support" echo " --enable-tinygl enable TinyGL support" echo " --enable-joystick enable joystick support" -echo " --enable-renoir enable renoir 3D support" echo " --disable-ssl disable OpenSSL support" echo " --enable-amr-nb-fixed enable AMR NB fixed-point decoder" echo " --enable-amr-nb enable AMR NB library" echo " --enable-amr-wb enable AMR WB library" echo " --enable-amr enable both AMR NB and WB libraries" +echo " --static-mp4box configure for static linking of MP4Box." +echo " --enable-depth enables depth handling in the compositor" + +echo "" +echo "Configuration options for libgpac - all options can be enabled with --enable-optname" +echo " --disable-all disables all features in libgpac" +echo " --disable-3d disable 3D rendering" +echo " --disable-svg disable SVG" +echo " --disable-vrml disable MPEG-4/VRML/X3D" +echo " --disable-x3d disable X3D only" +echo " --disable-odf disable full support of MPEG-4 OD Framework" +echo " --disable-bifs disable BIFS coder" +echo " --disable-laser disable LASeR coder" +echo " --disable-beng disable scene encoder engine" +echo " --disable-qtvr disable import of Cubic QTVR files" +echo " --disable-avi disable AVI" +echo " --disable-ogg disable OGG" +echo " --disable-m2ps disable MPEG2 PS" +echo " --disable-m2ts disable MPEG2 TS" +echo " --disable-m2ts-mux disable MPEG2 TS Multiplexer" +echo " --disable-parsers disable AV parsers" +echo " --disable-import disable media importers" +echo " --disable-export disable media exporters" +echo " --disable-swf disable SWF import" +echo " --disable-scene-stats disable scene graph statistics" +echo " --disable-scene-dump disable scene graph dump" +echo " --disable-od-dump disable OD dump" +echo " --disable-mcrypt disable mcrypt" +echo " --disable-scene-encode disable BIFS & LASeR to ISO File Format encoding" +echo " --disable-loader-isoff disable scene loading from ISO File Format" +echo " --disable-loader-bt disable scene loading from ISO File Format" +echo " --disable-loader-xmt disable scene loading from ISO File Format" +echo " --disable-isoff disable ISO File Format" +echo " --disable-isoff-write disable ISO File Format edit/write" +echo " --disable-isoff-hint disable ISO File Format hinting" +echo " --disable-isoff-frag disable fragments in ISO File Format" +echo " --disable-streaming disable RTP/RTSP/SDP" echo "" echo "Extra libraries configuration. You can turn a libray off or force using the local version in gpac/extra_lib/" echo " --use-js=OPT force SpiderMonkey ECMAScript OPT=[no,local]" @@ -218,13 +297,19 @@ case "$cpu" in x86_64|amd64) cpu="x86" is_64="yes" - canon_arch="`cc -dumpmachine | sed -e 's,\([^-]*\)-.*,\1,'`" + case `uname -s` in + SunOS) + canon_arch=`isainfo -n` + ;; + *) + canon_arch="`$cc -dumpmachine | sed -e 's,\([^-]*\)-.*,\1,'`" + ;; + esac + if [ x"$canon_arch" = x"x86_64" -o x"$canon_arch" = x"amd64" ]; then if [ -z "`echo $CFLAGS | grep -- -m32`" ]; then cpu="x86_64" - libdir="lib64" - #that's a bit crude... - PIC_CFLAGS="-fPIC -DPIC" + libdir="lib64" want_pic="yes" fi fi @@ -235,6 +320,10 @@ case "$cpu" in alpha) cpu="alpha" ;; + ppc64) + cpu="powerpc" + libdir="lib64" + ;; "Power Macintosh"|ppc) cpu="powerpc" ;; @@ -244,6 +333,14 @@ case "$cpu" in sh4|sh4a|sh) cpu="sh4" ;; + sun4u|sun4v) + cpu="sparc" + if [ -z "`echo $CFLAGS | grep -- -m32`" ]; then + is_64="yes" + PIC_CFLAGS="-fPIC -DPIC" + want_pic="yes" + fi + ;; *) cpu="unknown" ;; @@ -309,7 +406,16 @@ fi ;; SunOS) make="gmake" -LDFLAGS="" +LDFLAGS="${opt#--extra-ldflags=}" +instflags="" +if test "$is_64" = "yes"; then + if test "$cpu" = "x86_64"; then + libdir=lib/amd64 + elif test "$cpu" = "sparc"; then + libdir=lib/sparcv9 + fi +fi +sunos="yes" need_inet_aton="yes" extralibs="$extralibs -lsocket -lnsl" ;; @@ -379,6 +485,7 @@ win32="yes" Linux) js_flags="-DXP_UNIX -I/usr/include/js" +LDFLAGS="$LDFLAGS -Wl,--warn-common" #OSS_LDFLAGS="-laoss" linux="yes" case "$cpu" in @@ -459,49 +566,141 @@ fi #look for spidermonkey JS support -cat > $TMPC << EOF -#include <jsapi.h> -int main( void ) { return 0; } +#spidermonkey test for new API +if test "$has_js" = "no" ; then + + cat > $TMPCPP << EOF + #include <jsapi.h> + int main( void ) { JSContext *cx; jsval *rp; return JS_AddValueRoot(cx, rp); } EOF -#regular spidermonkey -if $cc -o $TMPO $TMPC $js_flags -ljs 2> /dev/null ; then -js_inc="/usr/include" -has_js="system" -elif test "$alt_macosx_dir" != "" ; then - if cc -o $TMPO $TMPC -DXP_UNIX -I$alt_macosx_dir/include/js -L$alt_macosx_dir/lib -ljs 2> /dev/null ; then - has_js="system" - js_flags="-DXP_UNIX -I$alt_macosx_dir/include/js" - js_lib="-L$alt_macosx_dir/lib -ljs" - js_inc="$alt_macosx_dir/include/js" + #try local + js_inc="$local_inc/js" + js_flags="-DXP_UNIX -I$local_inc/js" + if $cpp -o $TMPO $TMPCPP $js_flags -L$local_lib -ljs -lpthread 2> /dev/null ; then + has_js="local" + #dc added + else + +if pkg-config --exists mozilla-js 2> /dev/null ; then + js_flags=`pkg-config --cflags mozilla-js` + js_lib_pkg=`pkg-config --libs mozilla-js` + if $cpp -o $TMPO $TMPCPP $js_flags $js_lib_pkg -lpthread 2> /dev/null ; then + has_js="system" + js_lib=`pkg-config --libs mozilla-js` + fi +fi + +if test "$has_js" = "no" ; then + #try prefix (DC) + js_inc="$prefix/include/js" + js_flags="-DXP_UNIX -I$prefix/include/js" + if $cpp -o $TMPO $TMPCPP $js_flags -L$prefix/lib -ljs -lpthread 2> /dev/null ; then + has_js="prefix" + #dc added end + else + if $cpp -o $TMPO $TMPCPP $js_flags -ljs -lpthread 2> /dev/null ; then + js_inc="/usr/include" + has_js="system" + elif $cpp -o $TMPO $TMPCPP -DXP_UNIX -I$alt_macosx_dir/include/js -L$alt_macosx_dir/lib -ljs -lpthread 2> /dev/null ; then + has_js="system" + js_flags="-DXP_UNIX -I$alt_macosx_dir/include/js" + js_lib="-L$alt_macosx_dir/lib -ljs" + js_inc="$alt_macosx_dir/include/js" + else + #debian spidermonkey (smjs) + js_flags="-DXP_UNIX -I/usr/include/smjs" + js_inc="/usr/include/smjs" + if $cpp -o $TMPO $TMPCPP $js_flags -lsmjs -lpthread 2> /dev/null ; then + has_js="system" + js_lib="-lsmjs" + else + #debian spidermonkey (mozjs) + js_flags="-DXP_UNIX -I/usr/include/mozjs" + js_inc="/usr/include/mozjs" + if $cpp -o $TMPO $TMPCPP $js_flags -lmozjs -lpthread 2> /dev/null ; then + has_js="system" + js_lib="-lmozjs" + fi + fi + fi + fi fi -else -#debian spidermonkey (smjs) -js_flags="-DXP_UNIX -I/usr/include/smjs" -js_inc="/usr/include/smjs" -if $cc -o $TMPO $TMPC $js_flags -lsmjs 2> /dev/null ; then -has_js="system" -js_lib="-lsmjs" -else -#debian spidermonkey (mozjs) -js_flags="-DXP_UNIX -I/usr/include/mozjs" -js_inc="/usr/include/mozjs" -if $cc -o $TMPO $TMPC $js_flags -lmozjs 2> /dev/null ; then -has_js="system" -js_lib="-lmozjs" -else -#try local -js_inc="$local_inc/js" -js_flags="-DXP_UNIX -I$local_inc/js" -if $cc -o $TMPO $TMPC $js_flags -L$local_lib -ljs 2> /dev/null ; then -has_js="local" fi fi + +if test "$has_js" != "no" ; then +js_flags="-DSPIDERMONKEY_NEW_API $js_flags" +echo "SpiderMonkey new API detected" # (version > 1.8.0rc1) fi + +#spidermonkey test for regular API +if test "$has_js" = "no" ; then + + cat > $TMPC << EOF + #include <jsapi.h> + int main( void ) { return 0; } +EOF + + #try local + js_inc="$local_inc/js" + js_flags="-DXP_UNIX -I$local_inc/js" + if $cc -o $TMPO $TMPC $js_flags -L$local_lib -ljs 2> /dev/null ; then + has_js="local" + #dc added + else + #try prefix (DC) + js_inc="$prefix/include/js" + js_flags="-DXP_UNIX -I$prefix/include/js" + if $cc -o $TMPO $TMPC $js_flags -L$prefix/lib -ljs 2> /dev/null ; then + has_js="prefix" + #dc added end + else + if pkg-config --exists mozilla-js 2> /dev/null ; then + js_flags=`pkg-config --cflags mozilla-js` + js_lib_pkg=`pkg-config --libs mozilla-js` + if $cc -o $TMPO $TMPC $js_flags $js_lib_pkg -lpthread 2> /dev/null ; then + has_js="system" + js_lib=`pkg-config --libs mozilla-js` + fi + fi + if test "$has_js" = "no" ; then + if $cc -o $TMPO $TMPC $js_flags -ljs 2> /dev/null ; then + js_inc="/usr/include" + has_js="system" + elif $cc -o $TMPO $TMPC -DXP_UNIX -I$alt_macosx_dir/include/js -L$alt_macosx_dir/lib -ljs 2> /dev/null ; then + has_js="system" + js_flags="-DXP_UNIX -I$alt_macosx_dir/include/js" + js_lib="-L$alt_macosx_dir/lib -ljs" + js_inc="$alt_macosx_dir/include/js" + else + #debian spidermonkey (smjs) + js_flags="-DXP_UNIX -I/usr/include/smjs" + js_inc="/usr/include/smjs" + if $cc -o $TMPO $TMPC $js_flags -lsmjs 2> /dev/null ; then + has_js="system" + js_lib="-lsmjs" + else + #debian spidermonkey (mozjs) + js_flags="-DXP_UNIX -I/usr/include/mozjs" + js_inc="/usr/include/mozjs" + if $cc -o $TMPO $TMPC $js_flags -lmozjs 2> /dev/null ; then + has_js="system" + js_lib="-lmozjs" + fi + fi + fi + fi + fi + fi + fi + if test "$has_js" != "no" ; then +if test "$linux" = "yes" ; then +if test "$cpu" != "sh4"; then #WARNING: there is a bug in MOZJS packages, the MOZILLA_1_8_BRANCH macro is not signaled, there is no way of knowing #if the lib has been compiled with or without the macro. We currently just decide that if the macro is present @@ -513,6 +712,11 @@ echo "If you have troubles with scripts in GPAC, disable this macro and recompil fi fi +fi +fi + +#fi + #end JS test @@ -525,20 +729,17 @@ cat > $TMPC << EOF #include FT_OUTLINE_H int main( void ) { return 0; } EOF -echo $cross_prefix if test "$cross_prefix" != "" ; then - if test "`which $prefix/bin/freetype-config`" != ""; then - ft_cflags="`$prefix/bin/freetype-config --cflags`" - ft_lflags="`$prefix/bin/freetype-config --libs`" - if $cc -o $TMPO $TMPC $ft_cflags $ft_lflags 2> /dev/null ; then + ft_cflags="-I$prefix/include " + ft_lflags="-L$prefix/lib -lfreetype" + if $cc -o $TMPO $TMPC $ft_cflags $ft_lflags 2> /dev/null ; then has_ft="system" - else + else ft_cflags="-I$local_inc/freetype" ft_lflags="-L$local_lib -lfreetype" if $cc -o $TMPO $TMPC $ft_cflags $ft_lflags 2> /dev/null ; then has_ft="local" fi - fi fi else if test "`which freetype-config`" != ""; then @@ -599,6 +800,18 @@ if test "$cross_prefix" != "" ; then has_jpeg="local" fi fi + else + jpeg_cflags="-I$prefix/include" + jpeg_lflags="-L$prefix/lib -ljpeg" + if $cc -o $TMPO $TMPC $jpeg_cflags $jpeg_lflags 2> /dev/null ; then + has_jpeg="system" + else + jpeg_cflags="-I$local_inc/jpeg" + jpeg_lflags="-L$local_lib -ljpeg" + if $cc -o $TMPO $TMPC $jpeg_cflags $jpeg_lflags 2> /dev/null ; then + has_jpeg="local" + fi + fi fi else if $cc -o $TMPO $TMPC -ljpeg 2> /dev/null ; then @@ -638,8 +851,8 @@ EOF if test "$cross_prefix" != "" ; then png_cflags="-I$prefix/include" png_lflags="-L$prefix/lib -lpng -lz" - echo $png_cflags - echo $png_lflags + #-nostdlib prevents from searching standard compiler libraries + #if $cc -o $TMPO $TMPC -nostdlib $png_cflags $png_lflags 2> /dev/null ; then if $cc -o $TMPO $TMPC $png_cflags $png_lflags 2> /dev/null ; then has_png="system" else @@ -702,14 +915,22 @@ cat > $TMPC << EOF int main( void ) { return 0; } EOF -if $cc -o $TMPO $TMPC -lxvidcore 2> /dev/null ; then -has_xvid="system" -elif test "$alt_macosx_dir" != "" ; then - if $cc -o $TMPO $TMPC -I$alt_macosx_dir/include -L$alt_macosx_dir/lib -lxvidcore 2> /dev/null ; then - has_xvid="system" - fi -elif $cc -o $TMPO $TMPC -I$local_inc/xvid -L$local_lib -lxvidcore 2> /dev/null ; then -has_xvid="local" +if test "$cross_prefix" != "" ; then + if $cc -o $TMPO $TMPC -I$prefix/include -L$prefix/lib -lxvidcore 2> /dev/null ; then + has_xvid="system" + elif $cc -o $TMPO $TMPC -I$local_inc/xvid -L$local_lib -lxvidcore 2> /dev/null ; then + has_xvid="local" + fi +else + if $cc -o $TMPO $TMPC -lxvidcore 2> /dev/null ; then + has_xvid="system" + elif test "$alt_macosx_dir" != "" ; then + if $cc -o $TMPO $TMPC -I$alt_macosx_dir/include -L$alt_macosx_dir/lib -lxvidcore 2> /dev/null ; then + has_xvid="system" + fi + elif $cc -o $TMPO $TMPC -I$local_inc/xvid -L$local_lib -lxvidcore 2> /dev/null ; then + has_xvid="local" + fi fi #look for FAAD support @@ -730,24 +951,41 @@ fi #look for FFMPEG support + +if pkg-config --exists libavcodec libavformat libswscale 2> /dev/null ; then + + ffmpeg_cflags=`pkg-config --cflags libavcodec libavformat libswscale` + ffmpeg_lflags=`pkg-config --libs libavcodec libavformat libswscale` + has_ffmpeg="system" + +else + +cat > $TMPC << EOF +#include <libavcodec/avcodec.h> +int main( void ) { return 0; } +EOF + +if $cc -o $TMPO $TMPC 2> /dev/null ; then +old_ffmpeg_inc="no" +else + +old_ffmpeg_inc="yes" + cat > $TMPC << EOF -#include <stddef.h> #include <ffmpeg/avcodec.h> int main( void ) { return 0; } EOF +fi + + if test "$cross_prefix" != "" ; then - echo "HELLO" - echo "HELLO" - echo "HELLO" if $cc -o $TMPO $TMPC -I$prefix/include -L$prefix/lib -lz -lavcodec -lavformat -lavutil 2> /dev/null ; then - echo "HELLO" - echo "HELLO" - echo "HELLO" has_ffmpeg="system" else if $cc -o $TMPO $TMPC -I$local_inc -L$local_lib -lz -lavcodec -lavformat 2> /dev/null ; then has_ffmpeg="local" + echo OK fi fi else @@ -762,6 +1000,8 @@ else fi fi +fi + #look for vorbis support cat > $TMPC << EOF #include <vorbis/codec.h> @@ -860,7 +1100,7 @@ fi has_wx="no" wx_too_old="no" -if test "`which wx-config`" != "" ; then +if type wx-config >/dev/null 2>&1; then wx_version=`wx-config --version | sed 's/[^0-9]//g'` @@ -901,6 +1141,16 @@ fi fi #end wx test +# If svg isn't disabled +if test "$disable_svg" != "yes"; then +# Then we check libxm2 presence via pkg-config + if pkg-config libxml-2.0 --exists > /dev/null 2>&1 ; then + libxml2_cflags=`pkg-config libxml-2.0 --cflags` + libxml2_lib_flags=`pkg-config libxml-2.0 --libs` + has_libxml2="yes" + fi +fi + # look for IPv6 cat > $TMPC << EOF @@ -913,7 +1163,7 @@ int main( void ) { struct ipv6_mreq mreq6; getaddrinfo(0,0,0,0); getnameinfo(0,0,0,0,0,0,0); - IN6_IS_ADDR_MULTICAST(0); + IN6_IS_ADDR_MULTICAST( (struct in6_addr *) 0); } EOF @@ -977,7 +1227,6 @@ if $cc -o $TMPE $TMPC > /dev/null 2>&1 ; then has_jack="yes" fi - for opt do case "$opt" in --sdl-cfg=*) sdl_path=`echo $opt | cut -d '=' -f 2`; sdl_local="yes" @@ -1012,7 +1261,9 @@ for opt do ;; --enable-gprof) gprof_build="yes"; ;; - --enable-pic) PIC_CFLAGS="-fPIC -DPIC"; want_pic="yes"; + --enable-static-bin) static_build="yes"; + ;; + --enable-pic) want_pic="yes"; ;; --disable-opt) no_gcc_opt="yes" ;; @@ -1020,32 +1271,28 @@ for opt do ;; --disable-wx) has_wx="no" ;; - --disable-fragments) iso_fragments="no" - ;; - --enable-readonly) make_readonly="yes" - ;; --disable-oss-audio) has_oss_audio="no" ;; --disable-x11-shm) has_x11_shm="no" ;; --disable-x11-xv) has_x11_xv="no" ;; - --disable-svg) disable_svg="yes" - ;; --enable-fixed-point) use_fixed_point="yes" ;; - --force-fixed-point) use_fixed_point="forced" - ;; --strip) INSTFLAGS="-s $INSTFLAGS" ;; - --track-memory) use_memory_tracking="yes" + --std-allocator) use_std_alloc="yes" ;; - --disable-opengl) disable_opengl="yes" + --track-memory) use_memory_tracking="yes" ;; --enable-tinygl) enable_tinygl="yes" ;; --disable-ssl) has_ssl="no" ;; + --enable-depth) enable_depth_compositor="yes" + ;; + --static-mp4box) static_mp4box="yes" + ;; --use-faad=*) has_faad=${opt#--use-faad=} ;; --use-js=*) has_js=${opt#--use-js=} @@ -1088,10 +1335,142 @@ has_png=$tmp_has_png ;; --enable-joystick) enable_joystick="yes" ;; - --enable-renoir) enable_renoir="yes" - ;; --enable-pulseaudio=*) has_pulseaudio="yes" ;; + + --disable-all) has_pulseaudio="yes"; disable_3d="yes"; disable_svg="yes"; disable_vrml="yes"; disable_od="yes"; disable_bifs="yes"; disable_bifs_enc="yes"; disable_laser="yes"; disable_beng="yes"; disable_qtvr="yes"; disable_avi="yes"; disable_ogg="yes"; disable_m2ps="yes"; disable_m2ts="yes"; disable_m2ts_mux="yes"; disable_parsers="yes"; disable_import="yes"; disable_export="yes"; disable_swf="yes"; disable_scene_stats="yes"; disable_scene_dump="yes"; disable_scene_encode="yes"; disable_loader_isoff="yes"; disable_od_dump="yes"; disable_mcrypt="yes"; disable_isoff="yes"; disable_isoff_write="yes"; disable_isoff_hint="yes"; disable_isoff_frag="yes"; disable_streaming="yes"; disable_x3d="yes"; disable_loader_bt="yes"; disable_loader_xmt="yes" + ;; + + --disable-3d) disable_3d="yes" + ;; + --enable-3d) disable_3d="no" + ;; + --disable-svg) disable_svg="yes" + ;; + --enable-svg) disable_svg="no" + ;; + --disable-vrml) disable_vrml="yes" + ;; + --enable-vrml) disable_vrml="no" + ;; + --disable-x3d) disable_x3d="yes" + ;; + --enable-x3d) disable_x3d="no" + ;; + --disable-odf) disable_od="yes" + ;; + --enable-odf) disable_od="no" + ;; + --disable-bifs) disable_bifs="yes" + ;; + --enable-bifs) disable_bifs="no" + ;; + --disable-bifs-enc) disable_bifs_enc="yes" + ;; + --enable-bifs-enc) disable_bifs_enc="no" + ;; + --disable-laser) disable_laser="yes" + ;; + --enable-laser) disable_laser="no" + ;; + --disable-beng) disable_beng="yes" + ;; + --enable-beng) disable_beng="no" + ;; + --disable-qtvr) disable_qtvr="yes" + ;; + --enable-qtvr) disable_qtvr="no" + ;; + --disable-avi) disable_avi="yes" + ;; + --enable-avi) disable_avi="no" + ;; + --disable-ogg) disable_ogg="yes" + ;; + --enable-ogg) disable_ogg="no" + ;; + --disable-m2ps) disable_m2ps="yes" + ;; + --enable-m2ps) disable_m2ps="no" + ;; + --disable-m2ts) disable_m2ts="yes" + ;; + --enable-m2ts) disable_m2ts="no" + ;; + --disable-m2ts-mux) disable_m2ts_mux="yes" + ;; + --enable-m2ts-mux) disable_m2ts_mux="no" + ;; + --disable-parsers) disable_parsers="yes" + ;; + --enable-parsers) disable_parsers="no" + ;; + --disable-import) disable_import="yes" + ;; + --enable-import) disable_import="no" + ;; + --disable-export) disable_export="yes" + ;; + --enable-export) disable_export="no" + ;; + --disable-swf) disable_swf="yes" + ;; + --enable-swf) disable_swf="no" + ;; + --disable-scene-stats) disable_scene_stats="yes" + ;; + --enable-scene-stats) disable_scene_stats="no" + ;; + --disable-scene-dump) disable_scene_dump="yes" + ;; + --enable-scene-dump) disable_scene_dump="no" + ;; + --disable-scene-encode) disable_scene_encode="yes" + ;; + --enable-scene-encode) disable_scene_encode="no" + ;; + --disable-loader-isoff) disable_loader_isoff="yes" + ;; + --enable-loader-isoff) disable_loader_isoff="no" + ;; + --disable-loader-bt) disable_loader_bt="yes" + ;; + --enable-loader-bt) disable_loader_bt="no" + ;; + --disable-loader-xmt) disable_loader_xmt="yes" + ;; + --enable-loader-xmt) disable_loader_xmt="no" + ;; + --disable-od-dump) disable_od_dump="yes" + ;; + --enable-od-dump) disable_od_dump="no" + ;; + --disable-mcrypt) disable_mcrypt="yes" + ;; + --enable-mcrypt) disable_mcrypt="no" + ;; + --disable-isoff) disable_isoff="yes" + ;; + --enable-isoff) disable_isoff="no" + ;; + --disable-isoff-write) disable_isoff_write="yes" + ;; + --enable-isoff-write) disable_isoff_write="no" + ;; + --disable-isoff-hint) disable_isoff_hint="yes" + ;; + --enable-isoff-hint) disable_isoff_hint="no" + ;; + --disable-isoff-frag) disable_isoff_frag="yes" + ;; + --enable-isoff-frag) disable_isoff_frag="no" + ;; + --disable-streaming) disable_streaming="yes" + ;; + --enable-streaming) disable_streaming="no" + ;; + + esac done @@ -1099,20 +1478,30 @@ done LINK3D="" INCL3D="" +DarwinGL="no" +if test "$darwin" = "yes" ; then +cat > $TMPC << EOF +#include <OpenGL/gl.h> +#include <OpenGL/glu.h> +int main( void ) { glEnable(GL_NORMALIZE); return 0; } +EOF +else cat > $TMPC << EOF #include <GL/gl.h> #include <GL/glu.h> -int main( void ) { return 0; } +int main( void ) { glEnable(GL_NORMALIZE); return 0; } EOF +fi -if test "$disable_opengl" = "no" ; then +if test "$disable_3d" = "no" ; then if test "$win32" = "yes" ; then LINK3D="-lopengl32 -lglu32" elif test "$darwin" = "yes" ; then - LINK3D="-lgl -lglu" + LINK3D="-framework OpenGL -framework GLUT" + DarwinGL="yes" else - LINK3D="-lGL -lglut" + LINK3D="-lGL -lGLU -lX11" fi if $cc -o $TMPO $TMPC $LINK3D 2> /dev/null ; then has_opengl="yes" @@ -1134,11 +1523,11 @@ EOF # has_tinygl="system" # LINK3D="-lTinyGL" if test "$enable_tinygl" = "yes" ;then - if $cc -o $TMPO $TMPC -I${source_path}/../../TinyGL/include -L${source_path}/../../TinyGL/lib/$target_bin_dir -lTinyGL 2> /dev/null ; then + if $cc -o $TMPO $TMPC -I${source_path}/../tiny-gl/include -L${source_path}/../tiny-gl/lib/$target_bin_dir -lTinyGL 2> /dev/null ; then has_tinygl="yes" has_opengl="yes" - LINK3D="-L${source_path}/../../TinyGL/lib/$target_bin_dir -lTinyGL" - INCL3D="-I${source_path}/../../TinyGL/include" + LINK3D="-L${source_path}/../tiny-gl/lib/$target_bin_dir -lTinyGL" + INCL3D="-I${source_path}/../tiny-gl/include" fi fi @@ -1243,7 +1632,7 @@ sdl_config="$sdl_path/sdl-config" sdl_static="yes" fi -if test "`which $sdl_config`" != ""; then +if type $sdl_config >/dev/null 2>&1; then cat > $TMPC << EOF #include <SDL.h> @@ -1301,12 +1690,37 @@ if test x"$mandir" = x""; then mandir="${prefix}/man" fi +if test "$static_mp4box" = "yes"; then +has_opengl="no" +has_ssl="no" +has_js="no" +has_jpeg="no" +has_png="no" +fi + +if test "$cpu" = "sh4"; then +viren_dir="`ls $source_path/modules | grep viren_out`" +if test "$viren_dir" = "viren_out"; then +enable_depth_compositor="yes" +enable_renoir="yes" +fi +fi + +#prepare for config.h writing +TMPH="${TMPDIR1}/gpac-conf-${RANDOM}-$$-${RANDOM}.h" +echo "/* Automatically generated by configure */" > $TMPH +echo "#ifndef GF_CONFIG_H" >> $TMPH +echo "#define GF_CONFIG_H" >> $TMPH +echo "#define GPAC_CONFIGURATION \"$GPAC_CONFIGURATION\"" >> $TMPH + + version=`grep '#define GPAC_VERSION ' $source_path/include/gpac/tools.h | cut -d '"' -f 2` echo "" echo "** System Configuration" echo "Install prefix: $prefix" echo "Source path: $source_path" -echo "C compiler: $cc" +echo "C compiler: $cc" +echo "C++ compiler: $cpp" echo "make: $make" echo "CPU: $cpu" echo "Big Endian: $bigendian" @@ -1317,23 +1731,150 @@ echo "" echo "** GPAC $version Core Configuration **" echo "debug version: $debuginfo" echo "GProf enabled: $gprof_build" +echo "Static build enabled: $static_build" echo "Memory tracking enabled: $use_memory_tracking" -echo "read-only version: $make_readonly" +echo "Use standard memory allocator: $use_std_alloc" echo "fixed-point version: $use_fixed_point" echo "IPV6 Support: $has_ipv6" -echo "IsoMedia MovieFragments support: $iso_fragments" -echo "SVG Support disabled: $disable_svg" + + +if test "$disable_svg" = "yes" ; then +echo "SVG disabled" +echo "#define GPAC_DISABLE_SVG" >> $TMPH +fi +if test "$disable_vrml" = "yes" ; then +echo "MPEG-4/VRML/X3D disabled" +echo "#define GPAC_DISABLE_VRML" >> $TMPH +fi +if test "$disable_x3d" = "yes" ; then +echo "X3D disabled" +echo "#define GPAC_DISABLE_X3D" >> $TMPH +fi +if test "$disable_od" = "yes" ; then +echo "OD Full support disabled" +echo "#define GPAC_MINIMAL_ODF" >> $TMPH +fi +if test "$disable_bifs" = "yes" ; then +echo "BIFS coder disabled" +echo "#define GPAC_DISABLE_BIFS" >> $TMPH +fi +if test "$disable_bifs_enc" = "yes" ; then +echo "BIFS encoder disabled" +echo "#define GPAC_DISABLE_BIFS_ENC" >> $TMPH +fi +if test "$disable_laser" = "yes" ; then +echo "LASeR coder disabled" +echo "#define GPAC_DISABLE_LASER" >> $TMPH +fi +if test "$disable_beng" = "yes" ; then +echo "Scene encoder engine disabled" +echo "#define GPAC_DISABLE_SENG" >> $TMPH +fi +if test "$disable_qtvr" = "yes" ; then +echo "Cubic QTVR import disabled" +echo "#define GPAC_DISABLE_QTVR" >> $TMPH +fi +if test "$disable_avi" = "yes" ; then +echo "AVI disabled" +echo "#define GPAC_DISABLE_AVILIB" >> $TMPH +fi +if test "$disable_ogg" = "yes" ; then +echo "OGG disabled" +echo "#define GPAC_DISABLE_OGG" >> $TMPH +fi +if test "$disable_m2ps" = "yes" ; then +echo "MPEG-2 PS disabled" +echo "#define GPAC_DISABLE_MPEG2PS" >> $TMPH +fi +if test "$disable_m2ts" = "yes" ; then +echo "MPEG-2 TS disabled" +echo "#define GPAC_DISABLE_MPEG2TS" >> $TMPH +fi +if test "$disable_m2ts_mux" = "yes" ; then +echo "MPEG-2 TS Multiplexer disabled" +echo "#define GPAC_DISABLE_MPEG2TS_MUX" >> $TMPH +fi +if test "$disable_parsers" = "yes" ; then +echo "AV Parsers disabled" +echo "#define GPAC_DISABLE_AV_PARSERS" >> $TMPH +fi +if test "$disable_import" = "yes" ; then +echo "Media importers disabled" +echo "#define GPAC_DISABLE_MEDIA_IMPORT" >> $TMPH +fi +if test "$disable_export" = "yes" ; then +echo "Media exmporters disabled" +echo "#define GPAC_DISABLE_MEDIA_EXPORT" >> $TMPH +fi +if test "$disable_swf" = "yes" ; then +echo "SWF import disabled" +echo "#define GPAC_DISABLE_SWF_IMPORT" >> $TMPH +fi +if test "$disable_scene_stats" = "yes" ; then +echo "Scene statistics disabled" +echo "#define GPAC_DISABLE_SCENE_STATS" >> $TMPH +fi +if test "$disable_scene_dump" = "yes" ; then +echo "Scene dump disabled" +echo "#define GPAC_DISABLE_SCENE_DUMP" >> $TMPH +fi +if test "$disable_scene_encode" = "yes" ; then +echo "Scene encoder to ISO FF disabled" +echo "#define GPAC_DISABLE_SCENE_ENCODER" >> $TMPH +fi +if test "$disable_loader_isoff" = "yes" ; then +echo "Scene loader from ISO FF disabled" +echo "#define GPAC_DISABLE_LOADER_ISOM" >> $TMPH +fi +if test "$disable_loader_bt" = "yes" ; then +echo "BT/WRL Scene loader disabled" +echo "#define GPAC_DISABLE_LOADER_BT" >> $TMPH +fi +if test "$disable_loader_xmt" = "yes" ; then +echo "XMT/X3D Scene loader disabled" +echo "#define GPAC_DISABLE_LOADER_XMT" >> $TMPH +fi +if test "$disable_od_dump" = "yes" ; then +echo "OD dump disabled" +echo "#define GPAC_DISABLE_OD_DUMP" >> $TMPH +fi +if test "$disable_mcrypt" = "yes" ; then +echo "MCrypt disabled" +echo "#define GPAC_DISABLE_MCRYPT" >> $TMPH +fi +if test "$disable_isoff" = "yes" ; then +echo "ISO File Format disabled" +echo "#define GPAC_DISABLE_ISOM" >> $TMPH +fi +if test "$disable_isoff_write" = "yes" ; then +echo "ISO File Format write disabled" +echo "#define GPAC_DISABLE_ISOM_WRITE" >> $TMPH +fi +if test "$disable_isoff_hint" = "yes" ; then +echo "ISO File Format hinting disabled" +echo "#define GPAC_DISABLE_ISOM_HINTING" >> $TMPH +fi +if test "$disable_isoff_frag" = "yes" ; then +echo "ISO File Format fragments disabled" +echo "#define GPAC_DISABLE_ISOM_FRAGMENTS" >> $TMPH +fi +if test "$disable_streaming" = "yes" ; then +echo "RTP/RTSP/SDP streaming disabled" +echo "#define GPAC_DISABLE_STREAMING" >> $TMPH +fi + +if test "$enable_depth_compositor" = "yes" ; then +echo "Depth Compositor enabled" +echo "#define GF_SR_USE_DEPTH" >> $TMPH +fi + echo "" echo "** Detected libraries **" echo "zlib: $has_zlib" if test "$win32" != "yes" ; then -if test "$has_oss_audio" = "no"; then -echo "OSS Audio: no" -else -echo "OSS Audio: yes" -fi +echo "OSS Audio: $has_oss_audio" echo "ALSA Audio: $has_alsa" echo "Jack Audio: $has_jack" echo "PulseAudio Audio: $has_pulseaudio" @@ -1351,9 +1892,6 @@ echo "OpenSSL support: $has_ssl" echo "Mozilla XUL/GECKO support: $has_xul" -echo "Joystick support: $has_joystick" -echo "Renoir enabled: $enable_renoir" - if test "$win32" = "yes" ; then echo "DirectX Support: $has_mingw_directx" fi @@ -1394,6 +1932,10 @@ echo "Xiph Theora: $has_theora" fi echo "A52 (AC3): $has_a52" +if test "$enable_renoir" = "yes" ; then +echo "Renoir enabled - make sure the driver libraries are present in modules/viren_out directory" +fi + echo "" if test "$has_amr_nb_fixed" = "yes" ; then echo "*** AMR NB FIXED-POINT NOTICE ***" @@ -1440,29 +1982,20 @@ fi fi -#overwrite fixed-point in math.h -if test "$use_fixed_point" = "yes"; then -if grep "#define GPAC_NO_FIXED_POINT" $source_path/include/gpac/math.h > /dev/null 2>&1 ; then -sed -e 's/#define GPAC_NO_FIXED_POINT/#define GPAC_FIXED_POINT/' $source_path/include/gpac/math.h >$TMPH -cp -f $TMPH $source_path/include/gpac/math.h -fi -elif test "$use_fixed_point" = "forced"; then -CFLAGS="$CFLAGS -DGPAC_FIXED_POINT" -else -if grep "#define GPAC_FIXED_POINT" $source_path/include/gpac/math.h > /dev/null 2>&1 ; then -sed -e 's/#define GPAC_FIXED_POINT/#define GPAC_NO_FIXED_POINT/' $source_path/include/gpac/math.h >$TMPH -cp -f $TMPH $source_path/include/gpac/math.h -fi +if test "$want_pic" = "yes" ; then +CFLAGS="$CFLAGS -fPIC -DPIC" +CPPFLAGS="$CPPFLAGS -fPIC -DPIC" fi -TMPH="${TMPDIR1}/gpac-conf-${RANDOM}-$$-${RANDOM}.h" +ldir=`pwd` +CFLAGS="$CFLAGS -DGPAC_HAVE_CONFIG_H -I$ldir" +CPPFLAGS="$CPPFLAGS -DGPAC_HAVE_CONFIG_H -I$ldir" + echo "Creating config.mak" echo "# Automatically generated by configure - do not modify" > config.mak -echo "/* Automatically generated by configure */" > $TMPH -echo "#ifndef GF_CONFIG_H" >> $TMPH -echo "#define GF_CONFIG_H" >> $TMPH +echo "GPAC_CONFIGURATION=$GPAC_CONFIGURATION" >> config.mak echo "prefix=$prefix" >> config.mak echo "DESTDIR=$DESTDIR" >> config.mak @@ -1475,10 +2008,10 @@ echo "CC=$cc" >> config.mak echo "AR=$ar" >> config.mak echo "RANLIB=$ranlib" >> config.mak echo "STRIP=$strip" >> config.mak +echo "INSTALL=$install" >> config.mak +echo "INSTFLAGS=$instflags" >> config.mak echo "OPTFLAGS=$CFLAGS" >> config.mak echo "CPPFLAGS=$CPPFLAGS" >> config.mak -echo "PIC_CFLAGS=$PIC_CFLAGS" >> config.mak -echo "WANT_PIC=$want_pic" >> config.mak echo "LDFLAGS=$LDFLAGS" >> config.mak echo "SHFLAGS=$SHFLAGS" >> config.mak echo "libdir=$libdir" >> config.mak @@ -1512,6 +2045,17 @@ fi echo "EXTRALIBS=$extralibs" >> config.mak echo "VERSION=$version" >>config.mak +if test "$use_fixed_point" = "yes"; then +echo "#define GPAC_FIXED_POINT" >> $TMPH +fi + +if test "$use_memory_tracking" = "yes"; then +echo "#define GPAC_MEMORY_TRACKING" >> $TMPH +elif test "$use_std_alloc" = "yes"; then +echo "#define GPAC_STD_ALLOCATOR" >> $TMPH +fi + + if test "$win32" = "yes" ; then echo "CONFIG_WIN32=yes" >> config.mak echo "CONFIG_OS=CONFIG_WIN32" >> config.mak @@ -1528,7 +2072,14 @@ elif test "$darwin" = "yes" ; then echo "CONFIG_DARWIN=yes" >> config.mak echo "CONFIG_OS=CONFIG_DARWIN" >> config.mak echo "#define GPAC_CONFIG_DARWIN" >> $TMPH + if test "$DarwinGL" = "yes" ; then + echo "#define CONFIG_DARWIN_GL" >> $TMPH + fi echo "mac_apps=$Mac_Applications" >> config.mak +elif test "$sunos" = "yes" ; then + echo "CONFIG_SUNOS=yes" >> config.mak + echo "CONFIG_OS=CONFIG_SUNOS" >> config.mak + echo "#define GPAC_CONFIG_SUNOS" >> $TMPH else echo "CONFIG_OS=CONFIG_GEN" >> config.mak echo "#define GPAC_CONFIG_GENERIC" >> $TMPH @@ -1573,20 +2124,27 @@ echo "CONFIG_OGG=$has_ogg" >> config.mak echo "CONFIG_VORBIS=$has_vorbis" >> config.mak echo "CONFIG_THEORA=$has_theora" >> config.mak echo "CONFIG_FFMPEG=$has_ffmpeg" >> config.mak +echo "CONFIG_FFMPEG_OLD=$old_ffmpeg_inc" >> config.mak + echo "CONFIG_OSS_AUDIO=$has_oss_audio" >> config.mak echo "CONFIG_ALSA=$has_alsa" >> config.mak echo "CONFIG_JACK=$has_jack" >> config.mak echo "CONFIG_A52=$has_a52" >> config.mak echo "DISABLE_SVG=$disable_svg" >> config.mak +echo "HAS_LIBXML2=$has_libxml2" >> config.mak +if test "$has_libxml2" = "yes"; then + echo "XML2_CFLAGS=$libxml2_cflags" >> config.mak + echo "XML2_LIBS=$libxml2_lib_flags" >> config.mak +fi + + echo "GPAC_USE_TINYGL=$has_tinygl" >> config.mak echo "OGL_INCLS=$INCL3D" >> config.mak -if test "$disable_svg" = "yes" ; then -echo "#define GPAC_DISABLE_SVG" >> $TMPH -fi + +echo "DISABLE_ISOFF=$disable_isoff" >> config.mak + echo "HAS_OPENGL=$has_opengl" >> config.mak -echo "ENABLE_JOYSTICK=$has_joystick" >> config.mak -echo "TRISCOPE_MODE=$enable_renoir" >> config.mak if test "$has_opengl" = "yes" ; then echo "OGL_LIBS=$LINK3D" >> config.mak @@ -1598,6 +2156,8 @@ if test "$has_tinygl" = "yes" ; then echo "#define GPAC_USE_TINYGL" >> $TMPH fi +echo "ENABLE_JOYSTICK=$has_joystick" >> config.mak + echo "HAS_OPENSSL=$has_ssl" >> config.mak if test "$has_ssl" = "yes" ; then echo "SSL_LIBS=$LINK_SSL" >> config.mak @@ -1620,15 +2180,7 @@ echo "CONFIG_AMR_NB_FT=$has_amr_nb" >> config.mak echo "CONFIG_AMR_WB_FT=$has_amr_wb" >> config.mak echo "DEBUGBUILD=$debuginfo" >> config.mak echo "GPROFBUILD=$gprof_build" >> config.mak - -echo "GPACREADONLY=$make_readonly" >> config.mak -if test "$make_readonly" = "yes" ; then - echo "#define GPAC_READ_ONLY" >> $TMPH -fi -echo "ISOFRAGMENTS=$iso_fragments" >> config.mak -if test "$iso_fragments" = "no" ; then - echo "#define GPAC_ISOM_NO_FRAGMENTS" >> $TMPH -fi +echo "STATICBUILD=$static_build" >> config.mak echo "CONFIG_IPV6=$has_ipv6" >> config.mak if test "$has_ipv6" = "yes" ; then @@ -1666,6 +2218,7 @@ echo "OSS_LDFLAGS=$OSS_LDFLAGS" >> config.mak fi echo "CONFIG_X11=$has_x11" >> config.mak + if test "$has_x11_shm" = "yes"; then echo "USE_X11_SHM=$has_x11_shm" >> config.mak fi @@ -1680,19 +2233,9 @@ echo "X11_LIB_PATH=$X11_PATH/lib" >> config.mak fi echo "X11_INC_PATH=$X11_PATH/include" >> config.mak -#overwrite memory tracking in setup.h -if test "$use_memory_tracking" = "yes"; then -if grep "#define GPAC_MEMORY_TRACKING 0" $source_path/include/gpac/setup.h > /dev/null 2>&1 ; then -sed -e 's/#define GPAC_MEMORY_TRACKING 0/#define GPAC_MEMORY_TRACKING 1/' $source_path/include/gpac/setup.h >$TMPH -cp -f $TMPH $source_path/include/gpac/setup.h -fi -else -if grep "#define GPAC_MEMORY_TRACKING 1" $source_path/include/gpac/setup.h > /dev/null 2>&1 ; then -sed -e 's/#define GPAC_MEMORY_TRACKING 1/#define GPAC_MEMORY_TRACKING 0/' $source_path/include/gpac/setup.h >$TMPH -cp -f $TMPH $source_path/include/gpac/setup.h -fi -fi +echo "MP4BOX_STATIC=$static_mp4box" >> config.mak +echo "RENOIR_ENABLE=$enable_renoir" >> config.mak GPAC_ENST_INC=no GPAC_ENST=no @@ -1707,7 +2250,7 @@ int main( void ) { } EOF -if $cc -o $TMPE $TMPC -liconv > /dev/null 2>&1 ; then +if $cc -o $TMPE $TMPC -L$local_lib -liconv > /dev/null 2>&1 ; then GPAC_ENST=yes echo "LIBGPAC_ENST=`cd src; ls enst/*.c | sed -e 's/\.c/.o/' | tr -s '\r\n' ' ' ; cd ..`" >> config.mak else @@ -1724,10 +2267,6 @@ if test "$source_path_used" = "yes" ; then echo "Creating compilation tree image" SRC_DIRS="src src/utils src/isomedia src/ietf src/odf src/bifs src/scenegraph src/terminal src/mcrypt src/media_tools src/scene_manager src/compositor src/laser" - - if test "$enable_renoir" = "yes" ; then - SRC_DIRS+=" src/compositor/triscope_renoir" - fi APP_DIRS="applications/mp4box applications/mp4client applications/mp4box applications/osmozilla applications/osmo4_wx applications/testapps/mp4_streamer applications/testapps/mp42ts" @@ -1736,12 +2275,6 @@ if test "$source_path_used" = "yes" ; then done ln -sf $source_path/Makefile Makefile ln -sf $source_path/src/Makefile src/Makefile - ln -sf $source_path/src/libgpac.def src/libgpac.def - - #if test "$enable_renoir" = "yes" ; then - #should be done according to target - #cp $source_path/src/compositor/triscope_renoir/*.a src/compositor/triscope_renoir - #fi mkdir -p applications ln -sf $source_path/applications/Makefile applications/Makefile @@ -1752,19 +2285,20 @@ if test "$source_path_used" = "yes" ; then ln -sf $source_path/$dir/Makefile $dir/Makefile done - MOD_DIRS="modules modules/aac_in modules/ac3_in modules/alsa modules/amr_dec modules/amr_float_dec modules/bifs_dec modules/ctx_load modules/dummy_in modules/dx_hw modules/ffmpeg_in modules/ft_font modules/gpac_js modules/img_in modules/ismacryp modules/isom_in modules/jack modules/laser_dec modules/mp3_in modules/mpegts_in modules/odf_dec modules/ogg modules/oss_audio modules/pulseaudio modules/raw_out modules/rtp_in modules/saf_in modules/sdl_out modules/soft_raster modules/svg_in modules/timedtext modules/wav_out modules/x11_out modules/xvid_dec" + cur_dir="`pwd`" + cd $source_path/ + MOD_DIRS="`ls -d modules/*/`" + cd $cur_dir + + mkdir -p modules + ln -sf $source_path/modules/Makefile modules/Makefile + for dir in $MOD_DIRS ; do + if ls $source_path/$dir/Makefile > /dev/null 2>&1; then mkdir -p $dir ln -sf $source_path/$dir/Makefile $dir/Makefile - cd $source_path/$dir - if ls *.def > /dev/null 2>&1; then - def_file="`ls *.def`" - cd $cur_dir - ln -sf $source_path/$dir/$def_file $dir/$def_file - else - cd $cur_dir - fi + fi done if test "$has_mingw_directx" = "yes"; then ln -sf $source_path/modules/dx_hw/hand.cur modules/dx_hw/hand.cur @@ -1792,7 +2326,7 @@ else echo "config.h is unchanged" fi -rm -f $TMPO $TMPC $TMPS $TMPCPP $TMPH +rm -f $TMPO $TMPC $TMPE $TMPS $TMPCPP $TMPH if [ ! -d "./bin" ]; then mkdir ./bin |