Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 184126 | Differences between
and this patch

Collapse All | Expand All

(-)configure.in (-87 / +126 lines)
Lines 16-30 Link Here
16
16
17
dnl Only use -Wall if we have gcc
17
dnl Only use -Wall if we have gcc
18
if test "x$GCC" = "xyes"; then
18
if test "x$GCC" = "xyes"; then
19
  if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
19
    if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
20
    CFLAGS="$CFLAGS -Wall"
20
        CFLAGS="$CFLAGS -Wall"
21
  fi
21
    fi
22
  # gcc < 4.0 does not know '-Wno-pointer-sign'. Try to find out
22
    # gcc < 4.0 does not know '-Wno-pointer-sign'. Try to find out
23
  # whether we can set this option or not.
23
    # whether we can set this option or not.
24
  CFLAGS_orig=$CFLAGS
24
    CFLAGS_orig=$CFLAGS
25
  CFLAGS="$CFLAGS -Wno-pointer-sign"
25
    CFLAGS="$CFLAGS -Wno-pointer-sign"
26
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]])],
26
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]])],
27
                    [], [CFLAGS=$CFLAGS_orig])
27
                      [], [CFLAGS=$CFLAGS_orig])
28
fi
28
fi
29
29
30
GETTEXT_PACKAGE=gtkpod
30
GETTEXT_PACKAGE=gtkpod
Lines 32-54 Link Here
32
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",["Gettext package name"])
32
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",["Gettext package name"])
33
33
34
dnl check if pkg-config exists -- if not print a meaningful error message
34
dnl check if pkg-config exists -- if not print a meaningful error message
35
AC_CHECK_PROG([have_pkgconfig], [pkg-config], ["ok"])
35
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
36
36
if test -z "$PKG_CONFIG"; then
37
if test "y$have_pkgconfig" = "y"; then
37
    AC_MSG_FAILURE([*** pkg-config required (http://www.freedesktop.org/software/pkgconfig)])
38
	AC_MSG_FAILURE([**** pkg-config required (http://www.freedesktop.org/software/pkgconfig)])
38
else
39
    ac_cv_env_PKG_CONFIG_set=set
39
fi
40
fi
40
41
41
dnl check for libs that are managed with pkg-config
42
dnl check for required libs that are managed with pkg-config
42
PKG_CHECK_MODULES(PACKAGE, [gtk+-2.0 >= 2.6.0 gthread-2.0 >= 0.14.0 glib-2.0 > 2.4.0 libglade-2.0  >=  2.4.0 libgnomecanvas-2.0 >= 2.14.0 gmodule-2.0 libgpod-1.0 >= 0.5.2],,[AC_MSG_FAILURE([*** $PACKAGE_PKG_ERRORS])])
43
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6.0,, [AC_MSG_FAILURE([*** $GTK_PKG_ERRORS])])
43
AC_SUBST(PACKAGE_CFLAGS)
44
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.4.0,, [AC_MSG_FAILURE([*** $GLIB_PKG_ERRORS])])
44
AC_SUBST(PACKAGE_LIBS)
45
PKG_CHECK_MODULES(GMODULE, gmodule-2.0,, [AC_MSG_FAILURE([*** $GMODULE_PKG_ERRORS])])
46
PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 0.14.0,, [AC_MSG_FAILURE([*** $GTHREAD_PKG_ERRORS])])
47
PKG_CHECK_MODULES(LIBGLADE, libglade-2.0 >= 2.4.0,, [AC_MSG_FAILURE([*** $LIBGLADE_PKG_ERRORS])])
48
PKG_CHECK_MODULES(LIBGNOMECANVAS, libgnomecanvas-2.0 >= 2.14.0,, [AC_MSG_FAILURE([*** $LIBGNOMECANVAS_PKG_ERRORS])])
49
PKG_CHECK_MODULES(LIBGPOD, libgpod-1.0 >= 0.5.2,, [AC_MSG_FAILURE([*** $LIBGPOD_PKG_ERRORS])])
45
50
51
CFLAGS="$CFLAGS $GTK_CFLAGS $GLIB_CFLAGS $GMODULE_CFLAGS $GTHREAD_CFLAGS $LIBGLADE_CFLAGS $LIBGNOMECANVAS_CFLAGS $LIBGPOD_CFLAGS"
52
LIBS="$LIBS $GTK_LIBS $GLIB_LIBS $GMODULE_LIBS $GTHREAD_LIBS $LIBGLADE_LIBS $LIBGNOMECANVAS_LIBS $LIBGPOD_LIBS"
53
46
dnl we need 'flex'
54
dnl we need 'flex'
47
AM_PROG_LEX
55
AM_PROG_LEX
48
if ! test "y$LEX" = "yflex"; then
56
if ! test "y$LEX" = "yflex"; then
49
  if ! test "y$LEX" = "ylex"; then
57
    if ! test "y$LEX" = "ylex"; then
50
    AC_MSG_FAILURE([**** flex or lex required])
58
        AC_MSG_FAILURE([*** flex or lex required])
51
  fi
59
    fi
52
fi
60
fi
53
61
54
dnl Retrieve the path of mount and umount binaries
62
dnl Retrieve the path of mount and umount binaries
Lines 67-175 Link Here
67
AC_CHECK_FUNCS(getopt_long_only, , [AC_LIBOBJ(getopt)]) 
75
AC_CHECK_FUNCS(getopt_long_only, , [AC_LIBOBJ(getopt)]) 
68
AC_CHECK_FUNCS(getopt_long_only, , [AC_LIBOBJ(getopt1)]) 
76
AC_CHECK_FUNCS(getopt_long_only, , [AC_LIBOBJ(getopt1)]) 
69
77
70
dnl Check if flock() is available (seems to be missing on some
78
dnl Check if flock() is available (seems to be missing on some solaris versions)
71
dnl solaris versions)
72
AC_CHECK_FUNCS(flock)
79
AC_CHECK_FUNCS(flock)
73
80
74
dnl Check if statvfs() is available (otherwise we fall back on
81
dnl Check if statvfs() is available (otherwise we fall back on 'df' to determine
75
dnl 'df' to determine free space on the iPod
82
dnl free space on the iPod
76
AC_CHECK_FUNCS(statvfs)
83
AC_CHECK_FUNCS(statvfs)
77
84
78
dnl Check for libid3tag
85
dnl Check for libid3tag
79
AC_SEARCH_LIBS([id3_frame_field],
86
AC_SEARCH_LIBS([id3_frame_field], ["id3tag" "id3tag -lz"],,
80
	["id3tag" "id3tag -lz"],
87
    AC_MSG_ERROR([*** id3tag >= 0.15 lib not found (0.14 will not work!)]))
81
	,
82
	AC_MSG_ERROR([*** id3tag >= 0.15 lib not found (0.14 will not work!)]))
83
88
84
dnl Check for libcurl
89
dnl Check for libcurl
85
PKG_CHECK_MODULES(CURL, [libcurl >= 7.10.0], have_curl=yes, have_curl=no)
90
AC_ARG_WITH(curl, AC_HELP_STRING([--without-curl], [Disable coverart download support]))
86
if test "$have_curl" != "no"; then
91
if test "x$with_curl" != "xno"; then
87
    AC_DEFINE(HAVE_CURL, 1, ["libcurl support"])
92
    PKG_CHECK_MODULES(CURL, [libcurl >= 7.10.0], have_curl=yes, have_curl=no)
93
    if test "x$with_curl" = "xyes" -a "x$have_curl" = "xno"; then
94
        AC_MSG_ERROR([curl support explicitly requested but curl couldn't be found])
95
    fi
96
fi
97
AM_CONDITIONAL(HAVE_CURL, test "x$have_curl" = "xyes")
98
if test "x$have_curl" = "xyes"; then
99
    AC_DEFINE(HAVE_CURL, 1, [Define if you have curl support])
88
    have_curl="yes -- will build with coverart download support"
100
    have_curl="yes -- will build with coverart download support"
89
    CPPFLAGS="$CPPFLAGS $CURL_CFLAGS"
101
    CPPFLAGS="$CPPFLAGS $CURL_CFLAGS"
90
    CFLAGS="$CFLAGS $CURL_CFLAGS"
102
    CFLAGS="$CFLAGS $CURL_CFLAGS"
91
    LIBS="$LIBS $CURL_LIBS"
103
    LIBS="$LIBS $CURL_LIBS"
92
else
104
else
93
    echo "*** libcurl could not be found, not building coverart download support"
94
    have_curl="*no -- will build without coverart download support"
105
    have_curl="*no -- will build without coverart download support"
95
fi
106
fi
96
107
97
dnl Check for gnome-vfs
108
dnl Check for gnome-vfs
98
AC_ARG_WITH(gnome-vfs,
109
AC_ARG_WITH(gnome-vfs, AC_HELP_STRING([--without-gnome-vfs],[Disable autodetection support]))
99
	    AC_HELP_STRING([--without-gnome-vfs],[Disable autodetection support]))
100
if test "x$with_gnome_vfs" != "xno"; then
110
if test "x$with_gnome_vfs" != "xno"; then
101
  PKG_CHECK_MODULES(GNOME_VFS, [gnome-vfs-2.0 >= 2.6.0], enable_gnome_vfs=yes, enable_gnome_vfs=no)
111
    PKG_CHECK_MODULES(GNOME_VFS, [gnome-vfs-2.0 >= 2.6.0], have_gnome_vfs=yes, have_gnome_vfs=no)
102
  if test "x$enable_gnome_vfs" != "xyes" -a "x$with_gnome_vfs" = "xyes"; then
112
    if test "x$with_gnome_vfs" = "xyes" -a "x$have_gnome_vfs" = "xno"; then
103
      AC_MSG_ERROR([gnome-vfs support explicitly requested but gnome-vfs couldn't be found])
113
        AC_MSG_ERROR([gnome-vfs support explicitly requested but gnome-vfs couldn't be found])
104
  fi
114
    fi
105
fi
115
fi
106
if test "x$enable_gnome_vfs" = "xyes"; then
116
AM_CONDITIONAL(HAVE_GNOME_VFS, test "x$have_gnome_vfs" = "xyes")
107
    have_gnomevfs="yes -- will build with automount support"
117
if test "x$have_gnome_vfs" = "xyes"; then
118
    have_gnome_vfs="yes -- will build with automount support"
108
    AC_DEFINE(HAVE_GNOME_VFS, 1, [Define if you have gnome-vfs support])
119
    AC_DEFINE(HAVE_GNOME_VFS, 1, [Define if you have gnome-vfs support])
109
    CPPFLAGS="$CPPFLAGS $GNOME_VFS_CFLAGS"
120
    CPPFLAGS="$CPPFLAGS $GNOME_VFS_CFLAGS"
110
    CFLAGS="$CFLAGS $GNOME_VFS_CFLAGS"
121
    CFLAGS="$CFLAGS $GNOME_VFS_CFLAGS"
111
    LIBS="$LIBS $GNOME_VFS_LIBS"
122
    LIBS="$LIBS $GNOME_VFS_LIBS"
112
else
123
else
113
    echo "*** gnome-vfs-2 not found or disabled, not building iPod autodetection support"
124
    have_gnome_vfs="*no -- will build without iPod autodetection support"
114
    have_gnomevfs="*no -- will build without iPod autodetection support"
115
fi
125
fi
116
AM_CONDITIONAL(HAVE_GNOME_VFS, test x"$enable_gnome_vfs" = xyes)
117
126
118
#dnl Check for HAL
127
#dnl Check for HAL
119
AC_ARG_WITH(hal,
128
AC_ARG_WITH(hal, AC_HELP_STRING([--without-hal],[Disable HAL support]))
120
	    AC_HELP_STRING([--without-hal],[Disable HAL support]))
121
if test "x$with_hal" != "xno"; then
129
if test "x$with_hal" != "xno"; then
122
  PKG_CHECK_MODULES(HAL, hal >= 0.5 hal < 0.6, enable_hal=yes, enable_hal=no)
130
    PKG_CHECK_MODULES(HAL, hal >= 0.5 hal < 0.6, have_hal=yes, have_hal=no)
123
  if test "x$enable_hal" != "xyes" -a "x$with_hal" = "xyes"; then
131
    if test "x$with_hal" = "xyes" -a "x$have_hal" = "xno"; then
124
      AC_MSG_ERROR([HAL support explicitly requested but HAL couldn't be found])
132
        AC_MSG_ERROR([HAL support explicitly requested but HAL couldn't be found])
125
  fi
133
    fi
126
fi
134
fi
127
if test "x$enable_hal" = "xyes"; then
135
AM_CONDITIONAL(HAVE_HAL, test "x$have_hal" = "xyes")
128
  have_hal="yes -- will build with HAL support"
136
if test "x$have_hal" = "xyes"; then
129
  AC_DEFINE(HAVE_HAL, 1, [Define if you want HAL support])
137
    have_hal="yes -- will build with HAL support"
130
  CPPFLAGS="$CPPFLAGS $HAL_CFLAGS"
138
    AC_DEFINE(HAVE_HAL, 1, [Define if you have HAL support])
131
  CFLAGS="$CFLAGS $HAL_CFLAGS"
139
    CPPFLAGS="$CPPFLAGS $HAL_CFLAGS"
132
  LIBS="$LIBS $HAL_LIBS"
140
    CFLAGS="$CFLAGS $HAL_CFLAGS"
141
    LIBS="$LIBS $HAL_LIBS"
133
else
142
else
134
  have_hal="*no -- will build without HAL support"
143
    have_hal="*no -- will build without HAL support"
135
fi
144
fi
136
AM_CONDITIONAL(HAVE_HAL, test x"$enable_hal" = xyes)
137
145
138
139
dnl Check for libmp4v2 (and mp4.h)
146
dnl Check for libmp4v2 (and mp4.h)
140
AC_SEARCH_LIBS(MP4GetMetadataGrouping,
147
AC_ARG_WITH(mp4v2, AC_HELP_STRING([--without-mp4v2], [Disable MP4/AAC support]))
141
	["mp4v2" "mp4v2 -lstdc++" "mp4v2 -lz" "mp4v2 -lz -lstdc++"],
148
if test "x$with_mp4v2" != "xno"; then
142
	[AC_CHECK_HEADER(mp4.h,
149
    AC_SEARCH_LIBS(MP4GetMetadataGrouping,
143
	  [have_mp4v2="yes -- will build with aac support" AC_DEFINE_UNQUOTED(HAVE_LIBMP4V2, 1, ["Define to 1 if you have the mp4v2 library"])],
150
        ["mp4v2" "mp4v2 -lstdc++" "mp4v2 -lz" "mp4v2 -lz -lstdc++"],
144
	  [echo "*** mp4.h cannot be found. Check your mp4v2 installation."])])
151
        [AC_CHECK_HEADER(mp4.h, have_mp4v2=yes, have_mp4v2_header=no)], have_mp4v2=no)
145
152
    if test "x$have_mp4v2_header" = "xno"; then
146
if test "y$have_mp4v2" = "y"; then
153
        have_mp4v2="no"
147
	have_mp4v2="*no -- will build without aac support"
154
        AC_MSG_WARN([mp4.h cannot be found or is unusable. Check your mp4v2 installation.])
155
    fi
156
    if test "x$with_mp4v2" = "xyes" -a "x$have_mp4v2" = "xno"; then
157
        AC_MSG_ERROR([MP4/AAC support explicitly requested but libmp4v2 couldn't be found])
158
    fi
148
fi
159
fi
160
AM_CONDITIONAL(HAVE_LIBMP4V2, test "x$have_mp4v2" = "xyes")
161
if test "x$have_mp4v2" = "xyes"; then
162
    have_mp4v2="yes -- will build with aac support"
163
    AC_DEFINE(HAVE_LIBMP4V2, 1, [Define if you have the mp4v2 library])
164
else
165
    have_mp4v2="*no -- will build without aac support"
166
fi
149
167
150
dnl Check for libvorbisfile 
168
dnl Check for libvorbisfile
151
AC_SEARCH_LIBS(ov_open,
169
AC_ARG_WITH(ogg, AC_HELP_STRING([--without-ogg], [Disable Ogg/Vorbis support]))
152
        ["vorbisfile"],
170
if test "x$with_ogg" != "xno"; then
153
        [AC_CHECK_HEADER(vorbis/vorbisfile.h,
171
    AC_SEARCH_LIBS(ov_open, ["vorbisfile"],
154
          [have_vorbisfile="yes -- will build with ogg support" AC_DEFINE_UNQUOTED(HAVE_LIBVORBISFILE, 1, ["Define to 1 if you have the ogg library"])],
172
        [AC_CHECK_HEADER(vorbis/vorbisfile.h, have_ogg=yes, have_ogg_header=no)], have_ogg=no)
155
          [echo "*** vorbisfile.h cannot be found. Check your ogg/vorbis installation."])])
173
    if test "x$have_ogg_header" = "xno"; then
156
if test "y$have_vorbisfile" = "y"; then
174
        have_ogg="no"
157
        have_vorbisfile="*no -- will build without ogg support"
175
        AC_MSG_WARN([vorbis/vorbisfile.h cannot be found or is unusable. Check your ogg/vorbis installation.])
176
    fi
177
    if test "x$with_ogg" = "xyes" -a "x$have_ogg" = "xno"; then
178
        AC_MSG_ERROR([Ogg/Vorbis support explicitly requested but ogg/vorbis libs couldn't be found])
179
    fi
158
fi
180
fi
181
AM_CONDITIONAL(HAVE_LIBVORBISFILE, test "x$have_ogg" = "xyes")
182
if test "x$have_ogg" = "xyes"; then
183
    have_ogg="yes -- will build with ogg support"
184
    AC_DEFINE(HAVE_LIBVORBISFILE, 1, [Define if you have the ogg/vorbis library])
185
else
186
    have_ogg="*no -- will build without ogg support"
187
fi
159
188
160
dnl Check for FLAC
189
dnl Check for FLAC
161
AC_SEARCH_LIBS(FLAC__metadata_get_streaminfo,
190
AC_ARG_WITH(flac, AC_HELP_STRING([--without-flac], [Disable FLAC support]))
162
	["FLAC"],
191
if test "x$with_flac" != "xno"; then
163
	[AC_CHECK_HEADER(FLAC/metadata.h,
192
    AC_SEARCH_LIBS(FLAC__metadata_get_streaminfo, ["FLAC"],
164
          [have_flac="yes -- will build with FLAC support" AC_DEFINE_UNQUOTED(HAVE_FLAC, 1, ["Define to 1 if you have the flac library"])],
193
        [AC_CHECK_HEADER(FLAC/metadata.h, have_flac=yes, have_flac_header=no)], have_flac=no)
165
          [echo "*** FLAC/metadata.h cannot be found. Check your FLAC installation."])])
194
    if test "x$have_flac_header" = "xno"; then
166
if test "y$have_flac" = "y"; then
195
        have_flac="no"
167
        have_flac="*no -- will build without FLAC support"
196
        AC_MSG_WARN([FLAC/metadata.h cannot be found or is unusable. Check your FLACinstallation.])
197
    fi
198
    if test "xwith_flac" = "xyes" -a "x$have_flac" = "xno"; then
199
        AC_MSG_ERROR([FLAC support explicitly requested but flac libs couldn't be found])
200
    fi
168
fi
201
fi
202
AM_CONDITIONAL(HAVE_FLAC, test "x$have_flac" = "xyes")
203
if test "x$have_flac" = "xyes"; then
204
    have_flac="yes -- will build with FLAC support"
205
    AC_DEFINE(HAVE_FLAC, 1, [Define if you have the flac library])
206
else
207
    have_flac="*no -- will build without FLAC support"
208
fi
169
209
170
dnl Additional libs maybe needed when compiling under solaris
210
dnl Additional libs maybe needed when compiling under solaris
171
AC_SEARCH_LIBS(bind,
211
AC_SEARCH_LIBS(bind, ["socket" "nsl" "socket -lnsl"])
172
	      ["socket" "nsl" "socket -lnsl"])
173
212
174
dnl Check for Linux-specific headers (so we can compile Linux-specific
213
dnl Check for Linux-specific headers (so we can compile Linux-specific
175
dnl stuff only when compiling under Linux)
214
dnl stuff only when compiling under Linux)
Lines 195-209 Link Here
195
 Install path .........: $prefix
234
 Install path .........: $prefix
196
 GTK2 version .........: `pkg-config gtk+-2.0 --modversion`
235
 GTK2 version .........: `pkg-config gtk+-2.0 --modversion`
197
 GLib2/GThread version : `pkg-config gthread-2.0 --modversion`
236
 GLib2/GThread version : `pkg-config gthread-2.0 --modversion`
198
 gnome-vfs.............: $have_gnomevfs
237
 gnome-vfs.............: $have_gnome_vfs
199
 hal...................: $have_hal
238
 hal...................: $have_hal
200
 libcurl ..............: $have_curl
239
 libcurl ..............: $have_curl
201
 mp4v2 ................: $have_mp4v2
240
 mp4v2 ................: $have_mp4v2
202
 vorbisfile ...........: $have_vorbisfile
241
 vorbisfile ...........: $have_ogg
203
 FLAC .................: $have_flac
242
 FLAC .................: $have_flac
204
 Preprocessor .........: $CC $CPPFLAGS
243
 Preprocessor .........: $CC $CPPFLAGS
205
 Compiler .............: $CC $CFLAGS $PACKAGE_CFLAGS
244
 Compiler .............: $CC $CFLAGS
206
 Linker ...............: $CC $LDFLAGS $LIBS $PACKAGE_LIBS
245
 Linker ...............: $CC $LDFLAGS $LIBS
207
246
208
 Now type 'make' to build $PACKAGE $VERSION,
247
 Now type 'make' to build $PACKAGE $VERSION,
209
 and then 'make install' for installation.
248
 and then 'make install' for installation.
(-)src/Makefile.am (-5 / +2 lines)
Lines 1-9 Link Here
1
## Process this file with automake to produce Makefile.in
1
## Process this file with automake to produce Makefile.in
2
2
3
AM_CFLAGS = @PACKAGE_CFLAGS@
3
INCLUDES = -DMOUNT_BIN=\""@MOUNT@\"" \
4
5
INCLUDES = @PACKAGE_CFLAGS@ \
6
	   -DMOUNT_BIN=\""@MOUNT@\"" \
7
	   -DUMOUNT_BIN=\""@UMOUNT@\"" \
4
	   -DUMOUNT_BIN=\""@UMOUNT@\"" \
8
	   -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
5
	   -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
9
	   -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" 
6
	   -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" 
Lines 54-60 Link Here
54
    tools.c tools.h \
51
    tools.c tools.h \
55
    wavfile.c wavfile.h
52
    wavfile.c wavfile.h
56
53
57
gtkpod_LDADD = $(LIBS) @PACKAGE_LIBS@ $(INTLLIBS) @LIBOBJS@
54
gtkpod_LDADD = $(LIBS) $(INTLLIBS) @LIBOBJS@
58
55
59
EXTRA_DIST = getopt.h
56
EXTRA_DIST = getopt.h
60
57

Return to bug 184126