| 1 |
dnl |
|---|
| 2 |
dnl Copyright (C) 2006-2007 Travis Shirk <travis@pobox.com> |
|---|
| 3 |
dnl |
|---|
| 4 |
dnl This program is free software; you can redistribute it and/or modify |
|---|
| 5 |
dnl it under the terms of the GNU General Public License as published by |
|---|
| 6 |
dnl the Free Software Foundation; either version 2 of the License, or |
|---|
| 7 |
dnl (at your option) any later version. |
|---|
| 8 |
dnl |
|---|
| 9 |
dnl This program is distributed in the hope that it will be useful, |
|---|
| 10 |
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 11 |
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 12 |
dnl GNU General Public License for more details. |
|---|
| 13 |
dnl |
|---|
| 14 |
dnl You should have received a copy of the GNU General Public License |
|---|
| 15 |
dnl along with this program; if not, write to the Free Software |
|---|
| 16 |
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 17 |
dnl |
|---|
| 18 |
AC_PREREQ([2.59]) |
|---|
| 19 |
AC_INIT([Mesk], [0.3.99], [Travis Shirk <travis@pobox.com>], [mesk]) |
|---|
| 20 |
|
|---|
| 21 |
AC_CONFIG_AUX_DIR([scripts]) |
|---|
| 22 |
|
|---|
| 23 |
PACKAGE_CODENAME="TRUNK" |
|---|
| 24 |
AC_SUBST([PACKAGE_CODENAME]) |
|---|
| 25 |
|
|---|
| 26 |
EBUILD_RELEASE= |
|---|
| 27 |
EBUILD_VERSION=${PACKAGE_VERSION} |
|---|
| 28 |
if test -n "$EBUILD_RELEASE"; then |
|---|
| 29 |
EBUILD_VERSION=${EBUILD_VERSION}-${EBUILD_RELEASE} |
|---|
| 30 |
fi |
|---|
| 31 |
AC_SUBST([EBUILD_VERSION]) |
|---|
| 32 |
|
|---|
| 33 |
# Expand libdir so it is a full path rather than containing $prefix |
|---|
| 34 |
AS_AC_EXPAND(INSTALL_PREFIX, $libdir) |
|---|
| 35 |
AC_SUBST([INSTALL_PREFIX]) |
|---|
| 36 |
|
|---|
| 37 |
AC_COPYRIGHT([GNU GPL]) |
|---|
| 38 |
AC_REVISION([$Revision: 1.12 $]) |
|---|
| 39 |
|
|---|
| 40 |
BUILD_DATE=`date` |
|---|
| 41 |
AC_SUBST([BUILD_DATE]) |
|---|
| 42 |
MANPAGE_DATE=`date +'%b. %d, %Y'` |
|---|
| 43 |
AC_SUBST([MANPAGE_DATE]) |
|---|
| 44 |
|
|---|
| 45 |
PKG_PROG_PKG_CONFIG([0.19]) |
|---|
| 46 |
AC_PROG_MAKE_SET |
|---|
| 47 |
AC_PROG_INSTALL |
|---|
| 48 |
ACX_CHECK_PYTHON([2.5]) |
|---|
| 49 |
ACX_CHECK_EYED3([0.6.99]) |
|---|
| 50 |
PKG_CHECK_MODULES([pygtk], [pygtk-2.0 >= 2.10.0]) |
|---|
| 51 |
PKG_CHECK_MODULES([librsvg], [librsvg-2.0 >= 2.14.0]) |
|---|
| 52 |
|
|---|
| 53 |
sandbox_stub() |
|---|
| 54 |
{ |
|---|
| 55 |
return 0 |
|---|
| 56 |
} |
|---|
| 57 |
GST_INSPECT=gst-inspect-0.10 |
|---|
| 58 |
AC_ARG_ENABLE([sandbox], |
|---|
| 59 |
AC_HELP_STRING([--enable-sandbox], |
|---|
| 60 |
[Use this option when running within a sandbox, it will disable gst-inspect tests since they access ${HOME}/.gconfd]), |
|---|
| 61 |
if test "$enableval" = "yes"; then |
|---|
| 62 |
echo "YES" |
|---|
| 63 |
GST_INSPECT="sandbox_stub" |
|---|
| 64 |
fi |
|---|
| 65 |
) |
|---|
| 66 |
|
|---|
| 67 |
PKG_CHECK_MODULES([gstpython], [gst-python-0.10 >= 0.10.3]) |
|---|
| 68 |
PKG_CHECK_MODULES([gstpython], [gst-python-0.10 >= 0.10.3]) |
|---|
| 69 |
# Check for gstreamer must haves |
|---|
| 70 |
for element in playbin; do |
|---|
| 71 |
AC_MSG_CHECKING([checking for gstreamer ${element} plugin]) |
|---|
| 72 |
if $GST_INSPECT ${element} > /dev/null 2>&1; then |
|---|
| 73 |
AC_MSG_RESULT([yes]) |
|---|
| 74 |
else |
|---|
| 75 |
AC_MSG_RESULT([no]) |
|---|
| 76 |
AC_MSG_ERROR([Gstreamer plugin ${element} required.]) |
|---|
| 77 |
fi |
|---|
| 78 |
done |
|---|
| 79 |
# Check for gstreamer audio sinks |
|---|
| 80 |
have_gst_audio_sink=no |
|---|
| 81 |
for element in alsasink osssink esdsink gconfaudiosink autoaudiosink; do |
|---|
| 82 |
AC_MSG_CHECKING([checking for gstreamer ${element} plugin]) |
|---|
| 83 |
if $GST_INSPECT ${element} > /dev/null 2>&1; then |
|---|
| 84 |
have_gst_audio_sink=yes |
|---|
| 85 |
AC_MSG_RESULT([yes]) |
|---|
| 86 |
else |
|---|
| 87 |
AC_MSG_RESULT([no]) |
|---|
| 88 |
fi |
|---|
| 89 |
done |
|---|
| 90 |
if test "$have_gst_audio_sink" = "no"; then |
|---|
| 91 |
AC_MSG_ERROR([No Gstreamer output plugins found]) |
|---|
| 92 |
fi |
|---|
| 93 |
# Check gstreamer audio format support |
|---|
| 94 |
have_gst_audio_format=no |
|---|
| 95 |
for element in mad ogg vorbisdec cdio; do |
|---|
| 96 |
AC_MSG_CHECKING([checking for gstreamer ${element} plugin]) |
|---|
| 97 |
if $GST_INSPECT ${element} > /dev/null 2>&1; then |
|---|
| 98 |
have_gst_audio_format=yes |
|---|
| 99 |
eval have_gst_${element}=yes |
|---|
| 100 |
AC_MSG_RESULT([yes]) |
|---|
| 101 |
else |
|---|
| 102 |
eval have_gst_${element}=no |
|---|
| 103 |
AC_MSG_RESULT([no]) |
|---|
| 104 |
fi |
|---|
| 105 |
done |
|---|
| 106 |
if test "$have_gst_audio_format" = "no"; then |
|---|
| 107 |
AC_MSG_ERROR([No Gstreamer audio format plugins found]) |
|---|
| 108 |
fi |
|---|
| 109 |
# Check gstreamer optionals |
|---|
| 110 |
for element in gnomevfs; do |
|---|
| 111 |
AC_MSG_CHECKING([checking for gstreamer ${element} plugin]) |
|---|
| 112 |
if $GST_INSPECT ${element} > /dev/null 2>&1; then |
|---|
| 113 |
eval have_gst_${element}=yes |
|---|
| 114 |
AC_MSG_RESULT([yes]) |
|---|
| 115 |
else |
|---|
| 116 |
eval have_gst_${element}=no |
|---|
| 117 |
AC_MSG_RESULT([no]) |
|---|
| 118 |
fi |
|---|
| 119 |
done |
|---|
| 120 |
# mp3 support |
|---|
| 121 |
HAVE_MP3_SUPPORT="no" |
|---|
| 122 |
if test "$have_gst_mad" = "yes"; then |
|---|
| 123 |
AC_ARG_ENABLE([mp3], |
|---|
| 124 |
AC_HELP_STRING([--disable-mp3], |
|---|
| 125 |
[disable mp3 support (default auto)]), |
|---|
| 126 |
enable_mp3="$enableval", enable_mp3="yes") |
|---|
| 127 |
if test "$enable_mp3" = "yes"; then |
|---|
| 128 |
HAVE_MP3_SUPPORT="yes" |
|---|
| 129 |
fi |
|---|
| 130 |
fi |
|---|
| 131 |
# vorbis support |
|---|
| 132 |
HAVE_OGGVORBIS_SUPPORT="no" |
|---|
| 133 |
if test "$have_gst_ogg" = "yes" && test "$have_gst_vorbisdec" = "yes"; then |
|---|
| 134 |
AC_ARG_ENABLE([oggvorbis], |
|---|
| 135 |
AC_HELP_STRING([--disable-oggvorbis], |
|---|
| 136 |
[disable ogg vorbis support (default auto)]), |
|---|
| 137 |
enable_oggvorbis="$enableval", enable_oggvorbis="yes") |
|---|
| 138 |
if test "$enable_oggvorbis" = "yes"; then |
|---|
| 139 |
# XXX: ogg.vorbis.__version__ (1.2) does not match my install (1.4), |
|---|
| 140 |
# and I don't see a member, no version checking going on |
|---|
| 141 |
ACX_CHECK_PYVORBIS |
|---|
| 142 |
HAVE_OGGVORBIS_SUPPORT="yes" |
|---|
| 143 |
fi |
|---|
| 144 |
fi |
|---|
| 145 |
# CD audio support |
|---|
| 146 |
HAVE_CDROM_SUPPORT="no" |
|---|
| 147 |
if test "$have_gst_cdio" = "yes"; then |
|---|
| 148 |
AC_ARG_ENABLE([cdrom], |
|---|
| 149 |
AC_HELP_STRING([--disable-cdrom], |
|---|
| 150 |
[disable CDROM support (default auto)]), |
|---|
| 151 |
enable_cdrom="$enableval", enable_cdrom="yes") |
|---|
| 152 |
if test "$enable_cdrom" = "yes"; then |
|---|
| 153 |
PKG_CHECK_MODULES([hal], [hal >= 0.5.7]) |
|---|
| 154 |
ACX_CHECK_CDDB_PY([1.4]) |
|---|
| 155 |
AC_CHECK_PROG([have_eject], [eject], [yes], [no]) |
|---|
| 156 |
if test "$have_eject" = "no"; then |
|---|
| 157 |
AC_MSG_ERROR( |
|---|
| 158 |
[The command line util 'eject' is required for CDROM support.]) |
|---|
| 159 |
fi |
|---|
| 160 |
HAVE_CDROM_SUPPORT="yes" |
|---|
| 161 |
fi |
|---|
| 162 |
fi |
|---|
| 163 |
|
|---|
| 164 |
# Dbus |
|---|
| 165 |
HAVE_DBUS_SUPPORT="no" |
|---|
| 166 |
AC_ARG_WITH([dbus], |
|---|
| 167 |
AC_HELP_STRING([--without-dbus], |
|---|
| 168 |
[Disable DBus support. Note that CD audio support requires DBus. (default auto)]), |
|---|
| 169 |
enable_dbus="$enableval", enable_dbus="yes") |
|---|
| 170 |
if test "$enable_dbus" = "yes"; then |
|---|
| 171 |
PKG_CHECK_MODULES([dbus], [dbus-1 >= 0.70]) |
|---|
| 172 |
PKG_CHECK_MODULES([dbusglib], [dbus-glib-1 >= 0.72]) |
|---|
| 173 |
ACX_CHECK_DBUS_PYTHON([0.70]) |
|---|
| 174 |
HAVE_DBUS_SUPPORT="yes" |
|---|
| 175 |
fi |
|---|
| 176 |
# Without DBus we have not CD support |
|---|
| 177 |
if test "$HAVE_DBUS_SUPPORT" = "no" -a "$HAVE_CDROM_SUPPORT" = "yes"; then |
|---|
| 178 |
AC_MSG_WARN([Disabling CDROM support due to lac of DBus]) |
|---|
| 179 |
HAVE_CDROM_SUPPORT="no" |
|---|
| 180 |
fi |
|---|
| 181 |
|
|---|
| 182 |
# Although the audio formats can cope with not being supported, DBus and CD |
|---|
| 183 |
# support can be disabled entirely |
|---|
| 184 |
if test "$HAVE_DBUS_SUPPORT" = "yes"; then |
|---|
| 185 |
AC_SUBST([DISABLE_DBUS_SUPPORT], [False]) |
|---|
| 186 |
else |
|---|
| 187 |
AC_SUBST([DISABLE_DBUS_SUPPORT], [True]) |
|---|
| 188 |
fi |
|---|
| 189 |
if test "$HAVE_CDROM_SUPPORT" = "yes" -a "$HAVE_DBUS_SUPPORT" = "yes"; then |
|---|
| 190 |
AC_SUBST([DISABLE_CDROM_SUPPORT], [False]) |
|---|
| 191 |
else |
|---|
| 192 |
AC_SUBST([DISABLE_CDROM_SUPPORT], [True]) |
|---|
| 193 |
fi |
|---|
| 194 |
|
|---|
| 195 |
# Done with tests, output files |
|---|
| 196 |
AC_CONFIG_FILES([Makefile\ |
|---|
| 197 |
po/Makefile\ |
|---|
| 198 |
setup.py\ |
|---|
| 199 |
src/mesk/info.py\ |
|---|
| 200 |
scripts/mesk\ |
|---|
| 201 |
doc/mesk.1]) |
|---|
| 202 |
if test -f README.in; then |
|---|
| 203 |
AC_CONFIG_FILES([README]) |
|---|
| 204 |
fi |
|---|
| 205 |
if test -f launch.sh.in; then |
|---|
| 206 |
AC_CONFIG_FILES([launch.sh]) |
|---|
| 207 |
fi |
|---|
| 208 |
AC_OUTPUT |
|---|
| 209 |
|
|---|
| 210 |
if test -f launch.sh; then |
|---|
| 211 |
# AC_OUTPUT strips the execute bit |
|---|
| 212 |
chmod 755 launch.sh |
|---|
| 213 |
fi |
|---|
| 214 |
|
|---|
| 215 |
echo " |
|---|
| 216 |
*************************************** |
|---|
| 217 |
Mesk Configuration: |
|---|
| 218 |
Install path: $prefix |
|---|
| 219 |
mp3: $HAVE_MP3_SUPPORT |
|---|
| 220 |
ogg vorbis: $HAVE_OGGVORBIS_SUPPORT |
|---|
| 221 |
CD audio: $HAVE_CDROM_SUPPORT |
|---|
| 222 |
DBus: $HAVE_DBUS_SUPPORT |
|---|
| 223 |
*************************************** |
|---|
| 224 |
" |
|---|