diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-04-22 00:02:08 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-04-22 00:02:08 +0000 |
commit | 7c1f25b46a7c9c4b953976631ae94a07e4ba531a (patch) | |
tree | 18fd7299f341195884c5ffc7ef621c252be08b73 /configure | |
parent | ee9dbb297db6adcac1df966e160e33b166b5a92a (diff) |
probe static SDL link
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@732 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 65 |
1 files changed, 46 insertions, 19 deletions
@@ -192,6 +192,7 @@ if test -z "$sdl" ; then sdl_config="sdl-config" sdl=no +sdl_static=no if test "$mingw32" = "yes" -a ! -z "$cross_prefix" ; then # win32 cross compilation case @@ -212,8 +213,24 @@ sdl_too_old=yes else sdl=yes fi + +# static link with sdl ? +if test "$sdl" = "yes" ; then +aa="no" +`$sdl_config --static-libs | grep \\\-laa > /dev/null` && aa="yes" +sdl_static_libs=`$sdl_config --static-libs` +if [ "$aa" = "yes" ] ; then + sdl_static_libs="$sdl_static_libs `aalib-config --libs`" +fi + +if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs 2> /dev/null; then + sdl_static=yes fi +fi # static link + +fi # sdl compile test + fi # cross compilation fi # -z $sdl @@ -275,16 +292,20 @@ echo "target list $target_list" echo "gprof enabled $gprof" echo "static build $static" echo "SDL support $sdl" +echo "SDL static link $sdl_static" echo "mingw32 support $mingw32" if test $sdl_too_old = "yes"; then echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support" fi +if test "$sdl_static" = "no"; then + echo "WARNING: cannot compile statically with SDL - qemu-fast won't have a graphical output" +fi config_mak="config-host.mak" config_h="config-host.h" -echo "Creating $config_mak and $config_h" +#echo "Creating $config_mak and $config_h" echo "# Automatically generated by configure - do not modify" > $config_mak echo "/* Automatically generated by configure - do not modify */" > $config_h @@ -364,23 +385,6 @@ if test "$static" = "yes" ; then echo "CONFIG_STATIC=yes" >> $config_mak echo "#define CONFIG_STATIC 1" >> $config_h fi -if test "$sdl" = "yes" ; then - echo "CONFIG_SDL=yes" >> $config_mak - echo "#define CONFIG_SDL 1" >> $config_h - echo "SDL_LIBS=`$sdl_config --libs`" >> $config_mak - aa="no" - `$sdl_config --static-libs | grep \\\-laa > /dev/null` && aa="yes" - echo -n "SDL_STATIC_LIBS=`$sdl_config --static-libs`" >> $config_mak - if [ "${aa}" = "yes" ] ; then - echo -n " `aalib-config --libs`" >> $config_mak ; - fi - echo "" >> $config_mak - echo -n "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak - if [ "${aa}" = "yes" ] ; then - echo -n " `aalib-config --cflags`" >> $config_mak ; - fi - echo "" >> $config_mak -fi if test "$slirp" = "yes" ; then echo "CONFIG_SLIRP=yes" >> $config_mak echo "#define CONFIG_SLIRP 1" >> $config_h @@ -413,7 +417,7 @@ if expr $target : '.*-user' > /dev/null ; then target_user_only="yes" fi -echo "Creating $config_mak, $config_h and $target_dir/Makefile" +#echo "Creating $config_mak, $config_h and $target_dir/Makefile" mkdir -p $target_dir if test "$target" = "arm-user" ; then @@ -465,6 +469,29 @@ if test "$target_user_only" = "yes" ; then echo "#define CONFIG_USER_ONLY 1" >> $config_h fi +# sdl defines + +if test "$target_user_only" = "no"; then + if test "$target_softmmu" = "no" -o "$static" = "yes"; then + if test "$sdl_static" = "yes" ; then + echo "#define CONFIG_SDL 1" >> $config_h + echo "CONFIG_SDL=yes" >> $config_mak + echo "SDL_LIBS=$sdl_static_libs" >> $config_mak + fi + else + if test "$sdl" = "yes" ; then + echo "#define CONFIG_SDL 1" >> $config_h + echo "CONFIG_SDL=yes" >> $config_mak + echo "SDL_LIBS=`$sdl_config --libs`" >> $config_mak + fi + fi + echo -n "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak + if [ "${aa}" = "yes" ] ; then + echo -n " `aalib-config --cflags`" >> $config_mak ; + fi + echo "" >> $config_mak +fi + done # for target in $targets # build tree in object directory if source path is different from current one |