diff --git a/configure.ac b/configure.ac index a82772c1..5474515e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -dnl Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2010 +dnl Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011 dnl Rocky Bernstein dnl dnl This program is free software; you can redistribute it and/or modify @@ -20,7 +20,6 @@ define(RELEASE_NUM, 83) define(CDIO_VERSION_STR, 0.$1git) AC_PREREQ(2.52) -AC_REVISION([$Id: configure.ac,v 1.238 2008/11/27 21:09:51 rocky Exp $])dnl AC_INIT([libcdio], [CDIO_VERSION_STR(RELEASE_NUM)], [libcdio-help@gnu.org]) AC_CONFIG_SRCDIR(src/cd-info.c) @@ -187,10 +186,16 @@ AC_HEADER_STDC AC_CHECK_HEADERS(errno.h fcntl.h glob.h limits.h pwd.h) AC_CHECK_HEADERS(stdarg.h stdbool.h stdio.h sys/cdio.h sys/param.h \ sys/time.h sys/timeb.h sys/utsname.h) -AC_CHECK_HEADERS(ncurses.h curses.h, break, [enable_cdda_player='no']) -dnl FreeBSD 4 has getopt in unistd.h. So we include that before -dnl getopt.h +# We have to disable cdda_player unless we have either ncurses.h or +# curses.h +if test $enable_cdda_player = 'yes' ; then + enable_cdda_player='no' + AC_CHECK_HEADERS(ncurses.h curses.h, enable_cdda_player='yes') +fi + +# FreeBSD 4 has getopt in unistd.h. So we include that before +# getopt.h AC_CHECK_HEADERS(unistd.h getopt.h) AC_SUBST(SBPCD_H) diff --git a/include/cdio/Makefile.am b/include/cdio/Makefile.am index 341fb97d..d4761c17 100644 --- a/include/cdio/Makefile.am +++ b/include/cdio/Makefile.am @@ -23,7 +23,10 @@ paranoiaheaders = cdda.h cdtext.h endif cdio_config.h: $(top_srcdir)/config.h - cp $(top_srcdir)/config.h cdio_config.h + echo '#ifndef CDIO_CONFIG_H' > cdio_config.h + echo '#define CDIO_CONFIG_H' >> cdio_config.h + cat $(top_srcdir)/config.h >>cdio_config.h + echo '#endif /* #ifndef CDIO_CONFIG_H */' >>cdio_config.h libcdioincludedir=$(includedir)/cdio libcdioinclude_HEADERS = \ diff --git a/lib/driver/cdtext.c b/lib/driver/cdtext.c index d5342707..ed7b2631 100644 --- a/lib/driver/cdtext.c +++ b/lib/driver/cdtext.c @@ -32,6 +32,9 @@ #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_STRINGS_H +#include +#endif #include diff --git a/lib/driver/utf8.c b/lib/driver/utf8.c index 6b7d3703..03ff4e56 100644 --- a/lib/driver/utf8.c +++ b/lib/driver/utf8.c @@ -1,6 +1,4 @@ /* - $Id: utf8.c,v 1.5 2008/04/22 15:29:12 karl Exp $ - Copyright (C) 2006, 2008 Burkhard Plaum This program is free software: you can redistribute it and/or modify @@ -128,7 +126,7 @@ do_convert(iconv_t cd, char * src, int src_len, while(1) { - if(iconv(cd, &inbuf, &inbytesleft, + if(iconv(cd, (ICONV_CONST char **)&inbuf, &inbytesleft, &outbuf, &outbytesleft) == (size_t)-1) { switch(errno) diff --git a/src/cd-info.c b/src/cd-info.c index a3535857..20572f92 100644 --- a/src/cd-info.c +++ b/src/cd-info.c @@ -26,6 +26,9 @@ #include "getopt.h" #include +#ifdef HAVE_STRINGS_H +#include +#endif #ifdef HAVE_CDDB #include #include "cddb.h"