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