summaryrefslogtreecommitdiff
path: root/configure.in
blob: 16d7b05e5690ff4fea461bb08baeb21c6d0363e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
dnl Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_HEADER(config.h)

PACKAGE="deadbeef"
VERSION="0.1.2-dev"

AM_INIT_AUTOMAKE($PACKAGE,$VERSION)

AC_PROG_CC
AC_PROG_CXX
AC_STDC_HEADERS
AC_PROG_INSTALL
dnl AC_PROG_RANLIB
AC_PROG_LIBTOOL
LT_INIT
AC_CONFIG_MACRO_DIR([m4])
AC_C_BIGENDIAN
AC_DEFINE([PREFIX], [], [Installation prefix])

test "x$prefix" = xNONE && prefix=$ac_default_prefix
AC_DEFINE_UNQUOTED(PREFIX, "${prefix}")

CFLAGS="$CFLAGS -D_GNU_SOURCE -O2 -DHAVE_UNIX"
CPPFLAGS="$CFLAGS"

PKG_CHECK_MODULES(DEPS, gtk+-2.0 >= 2.12 gthread-2.0 glib-2.0 vorbis vorbisfile samplerate alsa)
PKG_CHECK_MODULES(LASTFM_DEPS, libcurl)

AX_EXT()

dnl ape plugin
AC_CHECK_LIB([mac], [main], [HAVE_LIBMAC=1])
if test ${HAVE_LIBMAC}; then
    APE_LIBS="-lmac"
    APE_DIR="plugins/ape"
    AC_SUBST(APE_LIBS)
    AC_SUBST(APE_DIR)
fi

dnl mpgmad plugin
AC_CHECK_LIB([mad], [main], [HAVE_LIBMAD=1])
if test ${HAVE_LIBMAD}; then
    MAD_LIBS="-lmad"
    MPGMAD_DIR="plugins/mpgmad"
    AC_SUBST(MAD_LIBS)
    AC_SUBST(MPGMAD_DIR)
fi

dnl vorbis plugin
AC_CHECK_LIB([vorbis], [main], [HAVE_VORBIS=1])
AC_CHECK_LIB([vorbisfile], [main], [HAVE_VORBISFILE=1])

if test ${HAVE_VORBIS} && test ${HAVE_VORBISFILE} ; then
    VORBIS_LIBS="-lvorbis -lvorbisfile"
    VORBIS_DIR="plugins/vorbis"
    AC_SUBST(VORBIS_DIR)
    AC_SUBST(VORBIS_LIBS)
fi

dnl flac plugin
AC_CHECK_LIB([FLAC], [main], [HAVE_FLAC=1])

if test ${HAVE_FLAC} ; then
    FLAC_LIBS="-lFLAC"
    FLAC_DIR="plugins/flac"
    AC_SUBST(FLAC_LIBS)
    AC_SUBST(FLAC_DIR)
fi


AC_OUTPUT([
Makefile
pixmaps/Makefile
gme/Game_Music_Emu-0.5.2/Makefile
gme/Game_Music_Emu-0.5.2/gme/Makefile
sid/sidplay-libs-2.1.0/Makefile
dumb/Makefile
plugins/hotkeys/Makefile
plugins/lastfm/Makefile
plugins/ape/Makefile
plugins/demac/Makefile
plugins/mpgmad/Makefile
plugins/vorbis/Makefile
plugins/flac/Makefile
deadbeef.desktop
])