diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 76 |
1 files changed, 43 insertions, 33 deletions
@@ -131,7 +131,7 @@ echocheck () { # # For now the variable is always set to 1, but we could add # another parameter for that... -add_flag_to_config_mk() { +add_flag_to_config_mk_if_no() { if test "$1" = no ; then _config_mk_data="$_config_mk_data"' '"$2 = 1" @@ -679,31 +679,31 @@ if test "$_cxx_major" -ge "3" ; then CXXFLAGS="$CXXFLAGS -ansi -W -Wno-unused-parameter" ;; esac - add_flag_to_config_mk no 'HAVE_GCC3' + add_flag_to_config_mk_if_no no 'HAVE_GCC3' fi; # # Engine selection # -add_flag_to_config_mk $_build_scumm 'DISABLE_SCUMM' -add_flag_to_config_mk $_build_scumm_7_8 'DISABLE_SCUMM_7_8' -add_flag_to_config_mk $_build_he 'DISABLE_HE' -add_flag_to_config_mk $_build_agos 'DISABLE_AGOS' -add_flag_to_config_mk $_build_sky 'DISABLE_SKY' -add_flag_to_config_mk $_build_sword1 'DISABLE_SWORD1' -add_flag_to_config_mk $_build_sword2 'DISABLE_SWORD2' -add_flag_to_config_mk $_build_queen 'DISABLE_QUEEN' -add_flag_to_config_mk $_build_kyra 'DISABLE_KYRA' -add_flag_to_config_mk $_build_saga 'DISABLE_SAGA' -add_flag_to_config_mk $_build_gob 'DISABLE_GOB' -add_flag_to_config_mk $_build_lure 'DISABLE_LURE' -add_flag_to_config_mk $_build_cine 'DISABLE_CINE' -add_flag_to_config_mk $_build_agi 'DISABLE_AGI' -add_flag_to_config_mk $_build_touche 'DISABLE_TOUCHE' -add_flag_to_config_mk $_build_parallaction 'DISABLE_PARALLACTION' -add_flag_to_config_mk $_build_cruise 'DISABLE_CRUISE' -add_flag_to_config_mk $_build_hq_scalers 'DISABLE_HQ_SCALERS' -add_flag_to_config_mk $_build_scalers 'DISABLE_SCALERS' +add_flag_to_config_mk_if_no $_build_scumm 'DISABLE_SCUMM' +add_flag_to_config_mk_if_no $_build_scumm_7_8 'DISABLE_SCUMM_7_8' +add_flag_to_config_mk_if_no $_build_he 'DISABLE_HE' +add_flag_to_config_mk_if_no $_build_agos 'DISABLE_AGOS' +add_flag_to_config_mk_if_no $_build_sky 'DISABLE_SKY' +add_flag_to_config_mk_if_no $_build_sword1 'DISABLE_SWORD1' +add_flag_to_config_mk_if_no $_build_sword2 'DISABLE_SWORD2' +add_flag_to_config_mk_if_no $_build_queen 'DISABLE_QUEEN' +add_flag_to_config_mk_if_no $_build_kyra 'DISABLE_KYRA' +add_flag_to_config_mk_if_no $_build_saga 'DISABLE_SAGA' +add_flag_to_config_mk_if_no $_build_gob 'DISABLE_GOB' +add_flag_to_config_mk_if_no $_build_lure 'DISABLE_LURE' +add_flag_to_config_mk_if_no $_build_cine 'DISABLE_CINE' +add_flag_to_config_mk_if_no $_build_agi 'DISABLE_AGI' +add_flag_to_config_mk_if_no $_build_touche 'DISABLE_TOUCHE' +add_flag_to_config_mk_if_no $_build_parallaction 'DISABLE_PARALLACTION' +add_flag_to_config_mk_if_no $_build_cruise 'DISABLE_CRUISE' +add_flag_to_config_mk_if_no $_build_hq_scalers 'DISABLE_HQ_SCALERS' +add_flag_to_config_mk_if_no $_build_scalers 'DISABLE_SCALERS' if test -n "$_host"; then # Cross-compiling mode - add your target here if needed @@ -1039,10 +1039,10 @@ fi # if test "$_mt32emu" = no ; then _def_mt32emu='#undef USE_MT32EMU' - add_flag_to_config_mk yes 'USE_MT32EMU' + add_flag_to_config_mk_if_no yes 'USE_MT32EMU' else _def_mt32emu='#define USE_MT32EMU' - add_flag_to_config_mk no 'USE_MT32EMU' + add_flag_to_config_mk_if_no no 'USE_MT32EMU' fi # @@ -1062,8 +1062,10 @@ if test "$_vorbis" = yes ; then _def_vorbis='#define USE_VORBIS' LIBS="$LIBS $OGG_LIBS $VORBIS_LIBS -lvorbisfile -lvorbis -logg" INCLUDES="$INCLUDES $OGG_CFLAGS $VORBIS_CFLAGS" + add_flag_to_config_mk_if_no no 'USE_VORBIS' else _def_vorbis='#undef USE_VORBIS' + add_flag_to_config_mk_if_no yes 'USE_VORBIS' fi echo "$_vorbis" @@ -1081,15 +1083,17 @@ cc_check $LDFLAGS $CXXFLAGS $TREMOR_CFLAGS $TREMOR_LIBS -lvorbisidec && \ _tremor=yes fi if test "$_tremor" = yes && test "$_vorbis" = no; then - _def_tremor='#define USE_TREMOR' - _def_vorbis='#define USE_VORBIS' - LIBS="$LIBS $TREMOR_LIBS -lvorbisidec" - INCLUDES="$INCLUDES $TREMOR_CFLAGS" + _def_tremor='#define USE_TREMOR' + _def_vorbis='#define USE_VORBIS' + LIBS="$LIBS $TREMOR_LIBS -lvorbisidec" + INCLUDES="$INCLUDES $TREMOR_CFLAGS" + add_flag_to_config_mk_if_no no 'USE_TREMOR' else - if test "$_vorbis" = yes; then - _tremor="no (Ogg Vorbis/Tremor support is mutually exclusive)" - fi - _def_tremor='#undef USE_TREMOR' + if test "$_vorbis" = yes; then + _tremor="no (Ogg Vorbis/Tremor support is mutually exclusive)" + fi + _def_tremor='#undef USE_TREMOR' + add_flag_to_config_mk_if_no yes 'USE_TREMOR' fi echo "$_tremor" @@ -1110,8 +1114,10 @@ if test "$_flac" = yes ; then _def_flac='#define USE_FLAC' LIBS="$LIBS $FLAC_LIBS $OGG_LIBS -lFLAC -logg" INCLUDES="$INCLUDES $FLAC_CFLAGS" + add_flag_to_config_mk_if_no no 'USE_FLAC' else _def_flac='#undef USE_FLAC' + add_flag_to_config_mk_if_no yes 'USE_FLAC' fi echo "$_flac" @@ -1131,8 +1137,10 @@ if test "$_mad" = yes ; then _def_mad='#define USE_MAD' LIBS="$LIBS $MAD_LIBS -lmad" INCLUDES="$INCLUDES $MAD_CFLAGS" + add_flag_to_config_mk_if_no no 'USE_MAD' else _def_mad='#undef USE_MAD' + add_flag_to_config_mk_if_no yes 'USE_MAD' fi echo "$_mad" @@ -1218,8 +1226,10 @@ if test "$_mpeg2" = yes ; then _def_mpeg2='#define USE_MPEG2' INCLUDES="$INCLUDES $MPEG2_CFLAGS" LIBS="$LIBS $MPEG2_LIBS -lmpeg2" + add_flag_to_config_mk_if_no no 'USE_MPEG2' else _def_mpeg2='#undef USE_MPEG2' + add_flag_to_config_mk_if_no yes 'USE_MPEG2' fi echo "$_mpeg2" rm -f $TMPC $TMPO$EXEEXT @@ -1255,10 +1265,10 @@ fi if test "$_nasm" = yes ; then _def_nasm='#define USE_NASM' - add_flag_to_config_mk no 'HAVE_NASM' + add_flag_to_config_mk_if_no no 'HAVE_NASM' else _def_nasm='#undef USE_NASM' - add_flag_to_config_mk yes 'HAVE_NASM' + add_flag_to_config_mk_if_no yes 'HAVE_NASM' fi # |