configure.in
changeset 411 cade1e3a4cb8
parent 406 b67f52365db0
child 419 e27fe0bfe470
     1.1 --- a/configure.in	Sat Oct 03 07:53:24 2009 +0000
     1.2 +++ b/configure.in	Sat Oct 03 08:09:27 2009 +0000
     1.3 @@ -191,17 +191,26 @@
     1.4      printf("no\n*** libmikmod is older than %d.%d.%d, not using.\n",maj,min,rev);
     1.5      return 1;
     1.6  }
     1.7 -], EXTRA_CFLAGS="$EXTRA_CFLAGS -DLIBMIKMOD_MUSIC `$LIBMIKMOD_CONFIG --cflags`";EXTRA_LDFLAGS="$EXTRA_LDFLAGS `$LIBMIKMOD_CONFIG --libs`", CFLAGS="$CFLAGS_SAVED";LIBS="$LIBS_SAVED",
     1.8 -[echo $ac_n "cross compiling; assumed OK... $ac_c"])
     1.9 +], , , [echo $ac_n "cross compiling; assumed OK... $ac_c"])
    1.10      fi
    1.11 +    CFLAGS="$CFLAGS_SAVED"
    1.12 +    LIBS="$LIBS_SAVED"
    1.13  fi
    1.14  
    1.15  AC_ARG_ENABLE([music-mod],
    1.16  AC_HELP_STRING([--enable-music-mod], [enable MOD music via mikmod [[default=yes]]]),
    1.17 -              [], [enable_music_mod=$no_libmikmod])
    1.18 -if test x$enable_music_mod = xyes -a x$enable_music_libmikmod = xno; then
    1.19 -    EXTRA_CFLAGS="$EXTRA_CFLAGS -DMOD_MUSIC -I\$(srcdir)/mikmod"
    1.20 -    SOURCES="$SOURCES $srcdir/mikmod/*.c"
    1.21 +              [], [enable_music_mod=yes])
    1.22 +if test x$enable_music_mod = xyes; then
    1.23 +    EXTRA_CFLAGS="$EXTRA_CFLAGS -DMOD_MUSIC"
    1.24 +    SOURCES="$SOURCES $srcdir/music_mod.c"
    1.25 +
    1.26 +    if test x$enable_music_libmikmod = xyes; then
    1.27 +        EXTRA_CFLAGS="$EXTRA_CFLAGS -DLIBMIKMOD_MUSIC `$LIBMIKMOD_CONFIG --cflags`"
    1.28 +        EXTRA_LDFLAGS="$EXTRA_LDFLAGS `$LIBMIKMOD_CONFIG --libs`"
    1.29 +    else
    1.30 +        EXTRA_CFLAGS="$EXTRA_CFLAGS -I\$(srcdir)/mikmod"
    1.31 +        SOURCES="$SOURCES $srcdir/mikmod/*.c"
    1.32 +    fi
    1.33  fi
    1.34  AC_ARG_ENABLE([music-midi],
    1.35  AC_HELP_STRING([--enable-music-midi], [enable MIDI music via timidity [[default=yes]]]),