File: configure.ac

package info (click to toggle)
mp3splt-gtk 0.5.6-1.2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,476 kB
  • ctags: 618
  • sloc: ansic: 10,227; sh: 4,232; makefile: 78; sed: 16
file content (178 lines) | stat: -rw-r--r-- 5,495 bytes parent folder | download
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
#/**********************************************************
# *
# * mp3splt-gtk - utility using libmp3splt,
# *                for mp3/ogg splitting without decoding
# *
# * Copyright (c) 2002-2005 M. Trotta - <mtrotta@users.sourceforge.net>
# * Copyright (c) 2005-2009 Munteanu Alexandru - io_fx@yahoo.fr
# *
# * http://mp3splt.sourceforge.net
# *
# *********************************************************/

#/**********************************************************
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# *********************************************************/

#################################################
# Basic initialisations 
#################################################

AC_PREREQ(2.56)
AC_INIT(mp3splt-gtk, 0.5.6, io_fx@yahoo.fr)

AC_CONFIG_SRCDIR([src/mp3splt-gtk.c])
AM_INIT_AUTOMAKE(mp3splt-gtk, 0.5.6)
AC_CONFIG_HEADER([config.h])

CFLAGS="-Wall $CFLAGS -I../libmp3splt/include/ -I../../libmp3splt/include/ \
-I../libmp3splt/include/libmp3splt/ -I../../libmp3splt/include/libmp3splt/"
LDFLAGS="$LDFLAGS -L../libmp3splt/src -L../libmp3splt/src/.libs \
-L../../libmp3splt/src/.libs/ -L../../libmp3splt/src/"

#################################################
# Check for programs
#################################################

AC_PROG_CC
#gettext
AC_CHECK_HEADERS([unistd.h])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.13.1])

#################################################################
# Check for the type of the host
#################################################################

AC_MSG_CHECKING(the host)
AM_CONDITIONAL(NOT_WIN32,true)
case $host in
	*linux*)
		HOST="Linux-based system"
		;;
	*openbsd*)
		HOST="OpenBSD"
		LIBS="$LIBS `pkg-config --libs gtk+-2.0` -lpthread"
		CFLAGS="$CFLAGS `pkg-config --cflags gtk+-2.0`"
		;;
	*netbsd*)
		HOST="NetBSD"
		LIBS="$LIBS -D_nl_domain_bindings=libintl_nl_domain_bindings -lintl -lstdc++"
		;;
	*freebsd*)
		HOST="FreeBSD"
		LIBS="$LIBS -lpthread"
		;;
	*mingw*)
		AM_CONDITIONAL(NOT_WIN32,false)
		HOST="Mingw"
		LIBS="$LIBS -lwsock32 -lshlwapi -mwindows"
		#LIBS="$LIBS -lwsock32 -lshlwapi"
		CFLAGS="$CFLAGS -mms-bitfields -enable-stdcall-fixup"
		;;
	*solaris*)
		HOST="Solaris"
		LIBS="$LIBS -lsocket"
		;;
	*)
		HOST="Other"
                LIBS="$LIBS"
		;;
esac
AC_MSG_RESULT($HOST)

#################################################
# Check for libraries
#################################################

#################################################
#Check for GTK
AM_PATH_GTK_2_0(2.6.0,,AC_MSG_ERROR(mp3splt-gtk needs GTK+ >= 2.6.0))

#################################################
#Check for libmp3splt

MP3SPLT_CHECK(,[ AC_MSG_ERROR(libmp3splt version 0.5.5 needed :

Download the latest version of libmp3splt at http://mp3splt.sourceforge.net/
) ])

#################################################
#Check for audacious

AM_CONDITIONAL(AUDACIOUS,false)
audacious="no"
#checking for --disable-audacious & audacious library
AC_ARG_ENABLE(audacious,
AC_HELP_STRING([--disable-audacious], [Disable audacious player support. ]),
[AC_MSG_WARN([audacious support is disabled !])
audacious="disabled"]
,
#action if not given
[PKG_CHECK_MODULES(AUDACIOUS, [audacious >= 0.1],
  [AM_CONDITIONAL(AUDACIOUS,true) audacious="yes" ],
  [AC_MSG_ERROR([Audacious player development files are not installed.

    Install it or configure with "--disable-audacious".])])
])

#################################################
#Check for gstreamer

AM_CONDITIONAL(GSTREAMER,false)
gstreamer="no"
#checking for --disable-gstreamer & gstreamer library
AC_ARG_ENABLE(gstreamer,
AC_HELP_STRING([--disable-gstreamer], [Disable gstreamer 'internal' player support. ]),
[AC_MSG_WARN([gstreamer support is disabled !])
gstreamer="disabled"]
,
#action if not given
[PKG_CHECK_MODULES(GST, [gstreamer-0.10 >= 0.10
                         gstreamer-base-0.10 >= 0.10
                         gstreamer-plugins-base-0.10 >= 0.10],
  [AM_CONDITIONAL(GSTREAMER,true) gstreamer="yes"],
  [AC_MSG_ERROR([GStreamer >= 0.10 development files are not installed.

    Install it or configure with "--disable-gstreamer".])])
])

#################################################
# Generate Makefiles
#################################################

AC_OUTPUT(Makefile src/Makefile m4/Makefile po/Makefile.in doc/Makefile)

#################################################
# Output configuration
#################################################

echo
echo "---------------------------------------------------------"
echo "Configuration:"
echo
echo "    install path:            ${prefix}"
echo
echo " Players :"
echo
echo "    gstreamer                $gstreamer"
echo "    audacious                $audacious"
echo "    snackAmp                 yes"
echo
echo "---------------------------------------------------------"
echo