Mac OS X - Subversion

Hi

You seem to have chosen to use glibc's extension function getline (it's going to be required by posix 2008 I think) instead of the more widespread fgets. This will cause breakage on some systems including MacOSX.

I tried to be noninvasive and added getline.c and getline.h (slight variations of the ones provided by gnulib) and changed your configure.in to check for that problem:
getline.c
getline.h

PATCH:
Index: configure.in
===================================================================
--- configure.in (revision 2252)
+++ configure.in (working copy)

@@ -267,6 +267,13 @@
AC_CONFIG_LINKS([getopt.h:gnugetopt.h])]
)]
)
+
+dnl getline
+AC_CHECK_LIB(c, getline,
+ [AC_DEFINE([HAVE_GETLINE_IN_LIBC], 1,
+ [Define if we have getline in libc])],
+ [EXTRA_OBJS="$EXTRA_OBJS getline.o"]
+ )

dnl libid3tag (with zlib)
AC_CHECK_LIB(z, gzopen, [HAVE_ZLIB=yes],)
Index: equalizer.c
===================================================================
--- equalizer.c (revision 2252)
+++ equalizer.c (working copy)
@@ -31,6 +31,9 @@
#ifdef HAVE_STDINT_H
# include
#endif
+#ifndef HAVE_GETLINE_IN_LIBC
+# include "getline.h"
+#endif
#ifdef HAVE_LIMITS_H
# include
#endif

On a related note:

If you are on macos and want to build from scratch use this patch instead and add the files to the dir:
Index: configure.in
===================================================================
--- configure.in (revision 2252)
+++ configure.in (working copy)
@@ -42,7 +42,7 @@

AC_DEFINE([_FILE_OFFSET_BITS], 64, [Use 64bit IO])

-LDFLAGS="$LDFLAGS -export-dynamic"
+#LDFLAGS="$LDFLAGS -export-dynamic"

AC_HEADER_STDC
AC_HEADER_STDBOOL
@@ -267,6 +267,13 @@
AC_CONFIG_LINKS([getopt.h:gnugetopt.h])]
)]
)
+
+dnl getline
+AC_CHECK_LIB(c, getline,
+ [AC_DEFINE([HAVE_GETLINE_IN_LIBC], 1,
+ [Define if we have getline in libc])],
+ [EXTRA_OBJS="$EXTRA_OBJS getline.o"]
+ )

dnl libid3tag (with zlib)
AC_CHECK_LIB(z, gzopen, [HAVE_ZLIB=yes],)
Index: autogen.sh
===================================================================
--- autogen.sh (revision 2252)
+++ autogen.sh (working copy)
@@ -6,8 +6,8 @@
make distclean >/dev/null 2>/dev/null
fi

-libtoolize -c -f
-aclocal -I m4 && \
+glibtoolize -c -f
+aclocal -I m4 -I /usr/local/share/aclocal&& \
autoheader && \
automake -W all -a && \
autoconf -W syntax
Index: equalizer.c
===================================================================
--- equalizer.c (revision 2252)
+++ equalizer.c (working copy)
@@ -31,6 +31,9 @@
#ifdef HAVE_STDINT_H
# include
#endif
+#ifndef HAVE_GETLINE_IN_LIBC
+# include "getline.h"
+#endif
#ifdef HAVE_LIMITS_H
# include
#endif
Index: options.c
===================================================================
--- options.c (revision 2252)
+++ options.c (working copy)
@@ -448,8 +448,8 @@
option_add_bool ("SyncPlaylist", true);
option_add_int ("InputBuffer", 512, CHECK_RANGE(1), 32, INT_MAX);
option_add_int ("Prebuffering", 64, CHECK_RANGE(1), 0, INT_MAX);
- option_add_str ("JackOutLeft", "alsa_pcm:playback_1", CHECK_NONE);
- option_add_str ("JackOutRight", "alsa_pcm:playback_2", CHECK_NONE);
+ option_add_str ("JackOutLeft", "system:playback_1", CHECK_NONE);
+ option_add_str ("JackOutRight", "system:playback_2", CHECK_NONE);
option_add_bool ("ASCIILines", false);
option_add_str ("FastDir1", NULL, CHECK_NONE);
option_add_str ("FastDir2", NULL, CHECK_NONE);

Resolved by r2255, r2258 and r2265.