configure.in
changeset 0 4ce2db4db959
child 1 4ef9250a6471
equal deleted inserted replaced
-1:000000000000 0:4ce2db4db959
       
     1 dnl Process this file with autoconf to produce a configure script.
       
     2 AC_INIT(README)
       
     3 
       
     4 dnl Set various version strings - taken gratefully from the GTk sources
       
     5 
       
     6 # Making releases:
       
     7 #   MICRO_VERSION += 1;
       
     8 #   INTERFACE_AGE += 1;
       
     9 #   BINARY_AGE += 1;
       
    10 # if any functions have been added, set INTERFACE_AGE to 0.
       
    11 # if backwards compatibility has been broken,
       
    12 # set BINARY_AGE and INTERFACE_AGE to 0.
       
    13 
       
    14 MAJOR_VERSION=1
       
    15 MINOR_VERSION=0
       
    16 MICRO_VERSION=0
       
    17 INTERFACE_AGE=0
       
    18 BINARY_AGE=0
       
    19 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
       
    20 
       
    21 AC_SUBST(MAJOR_VERSION)
       
    22 AC_SUBST(MINOR_VERSION)
       
    23 AC_SUBST(MICRO_VERSION)
       
    24 AC_SUBST(INTERFACE_AGE)
       
    25 AC_SUBST(BINARY_AGE)
       
    26 AC_SUBST(VERSION)
       
    27 
       
    28 # libtool versioning
       
    29 LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
       
    30 LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
       
    31 LT_REVISION=$INTERFACE_AGE
       
    32 LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
       
    33 
       
    34 AC_SUBST(LT_RELEASE)
       
    35 AC_SUBST(LT_CURRENT)
       
    36 AC_SUBST(LT_REVISION)
       
    37 AC_SUBST(LT_AGE)
       
    38 
       
    39 dnl Setup for automake
       
    40 AM_INIT_AUTOMAKE(mixer, $VERSION)
       
    41 
       
    42 dnl Check for tools
       
    43 
       
    44 AC_PROG_MAKE_SET
       
    45 AC_PROG_CC
       
    46 AM_PROG_LIBTOOL
       
    47 AC_PROG_INSTALL
       
    48 
       
    49 dnl Check for SDL 0.11.2
       
    50 AM_PATH_SDL(0.11.2)
       
    51 CFLAGS="$CFLAGS $SDL_CFLAGS"
       
    52 LIBS="$LIBS $SDL_LIBS"
       
    53 
       
    54 dnl Check command-line options
       
    55 AC_ARG_ENABLE(music-cmd,
       
    56 [  --enable-music-cmd      support an external music player [default=yes]],
       
    57               , enable_music_cmd=yes)
       
    58 if test x$enable_music_cmd = xyes; then
       
    59     CFLAGS="$CFLAGS -DCMD_MUSIC"
       
    60 fi
       
    61 AC_ARG_ENABLE(music-wave,
       
    62 [  --enable-music-wave     enable streaming WAVE music [default=yes]],
       
    63               , enable_music_wave=yes)
       
    64 if test x$enable_music_wave = xyes; then
       
    65     CFLAGS="$CFLAGS -DWAV_MUSIC"
       
    66 fi
       
    67 AC_ARG_ENABLE(music-midi,
       
    68 [  --enable-music-midi     enable MIDI music via timidity [default=yes]],
       
    69               , enable_music_midi=yes)
       
    70 if test x$enable_music_midi = xyes; then
       
    71     CFLAGS="$CFLAGS -DMID_MUSIC -I\$(top_srcdir)/timidity"
       
    72     #MUSIC_SUBDIRS="$MUSIC_SUBDIRS timidity"
       
    73 fi
       
    74 AC_ARG_ENABLE(music-mod,
       
    75 [  --enable-music-mod      enable MOD music via mikmod [default=yes]],
       
    76               , enable_music_mod=yes)
       
    77 if test x$enable_music_mod = xyes; then
       
    78     CFLAGS="$CFLAGS -DMOD_MUSIC -I\$(top_srcdir)/mikmod"
       
    79     #MUSIC_SUBDIRS="$MUSIC_SUBDIRS mikmod"
       
    80 fi
       
    81 AC_ARG_ENABLE(music-mp3,
       
    82 [  --enable-music-mp3      enable MP3 music via smpeg [default=yes]],
       
    83               , enable_music_mp3=yes)
       
    84 if test x$enable_music_mp3 = xyes; then
       
    85     AC_MSG_CHECKING(for SMPEG headers and libraries)
       
    86     have_smpeg=no
       
    87     AC_TRY_COMPILE([
       
    88      #include <smpeg/smpeg.h>
       
    89     ],[
       
    90     ],[
       
    91     have_smpeg=yes
       
    92     ])
       
    93     AC_MSG_RESULT($have_smpeg)
       
    94     if test x$have_smpeg = xyes; then
       
    95         CFLAGS="$CFLAGS -DMP3_MUSIC"
       
    96         LIBS="$LIBS -lsmpeg"
       
    97     fi
       
    98 fi
       
    99 
       
   100 # Finally create all the generated files
       
   101 AC_OUTPUT([
       
   102 Makefile
       
   103 mikmod/Makefile
       
   104 timidity/Makefile
       
   105 ])