configure.in
author Stephane Peter
Sat, 30 Oct 1999 22:57:49 +0000
changeset 11 3939a99bf422
parent 6 cb0e8db1f996
child 20 ef0f22476bc5
permissions -rw-r--r--
Various bugfixes for music looping
     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 The alpha architecture needs special flags for binary portability
    50 AC_CANONICAL_TARGET
    51 case "$target" in
    52     alpha*-*-linux*)
    53         CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
    54         ;;
    55 esac
    56 
    57 dnl Check for SDL 0.11.2
    58 AM_PATH_SDL(0.11.2)
    59 CFLAGS="$CFLAGS $SDL_CFLAGS"
    60 LIBS="$LIBS $SDL_LIBS"
    61 
    62 dnl Check command-line options
    63 AC_ARG_ENABLE(music-cmd,
    64 [  --enable-music-cmd      support an external music player [default=yes]],
    65               , enable_music_cmd=yes)
    66 if test x$enable_music_cmd = xyes; then
    67     CFLAGS="$CFLAGS -DCMD_MUSIC"
    68 fi
    69 AC_ARG_ENABLE(music-wave,
    70 [  --enable-music-wave     enable streaming WAVE music [default=yes]],
    71               , enable_music_wave=yes)
    72 if test x$enable_music_wave = xyes; then
    73     CFLAGS="$CFLAGS -DWAV_MUSIC"
    74 fi
    75 AC_ARG_ENABLE(music-mod,
    76 [  --enable-music-mod      enable MOD music via mikmod [default=yes]],
    77               , enable_music_mod=yes)
    78 if test x$enable_music_mod = xyes; then
    79     CFLAGS="$CFLAGS -DMOD_MUSIC -I\$(top_srcdir)/mikmod"
    80     MUSIC_SUBDIRS="$MUSIC_SUBDIRS mikmod"
    81 fi
    82 AC_ARG_ENABLE(music-midi,
    83 [  --enable-music-midi     enable MIDI music via timidity [default=yes]],
    84               , enable_music_midi=yes)
    85 if test x$enable_music_midi = xyes; then
    86     CFLAGS="$CFLAGS -DMID_MUSIC -I\$(top_srcdir)/timidity"
    87     MUSIC_SUBDIRS="$MUSIC_SUBDIRS timidity"
    88 fi
    89 AC_ARG_ENABLE(music-mp3,
    90 [  --enable-music-mp3      enable MP3 music via smpeg [default=yes]],
    91               , enable_music_mp3=yes)
    92 if test x$enable_music_mp3 = xyes; then
    93     AC_MSG_CHECKING(for SMPEG headers and libraries)
    94     have_smpeg=no
    95     AC_TRY_COMPILE([
    96      #include <smpeg/smpeg.h>
    97     ],[
    98     ],[
    99     have_smpeg=yes
   100     ])
   101     AC_MSG_RESULT($have_smpeg)
   102     if test x$have_smpeg = xyes; then
   103         CFLAGS="$CFLAGS -DMP3_MUSIC"
   104         LIBS="$LIBS -lsmpeg"
   105     fi
   106 fi
   107 
   108 dnl Add Makefile conditionals
   109 AC_SUBST(MUSIC_SUBDIRS)
   110 AM_CONDITIONAL(USE_MIKMOD, test x$enable_music_mod = xyes)
   111 AM_CONDITIONAL(USE_TIMIDITY, test x$enable_music_midi = xyes)
   112 
   113 # Finally create all the generated files
   114 AC_OUTPUT([
   115 Makefile
   116 mikmod/Makefile
   117 timidity/Makefile
   118 ])