Correct test for enable_cdda to accept either curses.h *or* ncurses.h

Add <strings.h> in more places that use bzero. Checks suggested by Blake Jones.

Add preprocessor symbol CDIO_CONFIG_H to <cdio_config.h>
This commit is contained in:
R. Bernstein
2011-10-20 18:24:10 -04:00
parent 96343e07bf
commit b7203f5d6b
5 changed files with 21 additions and 9 deletions

View File

@@ -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 <rocky@gnu.org>
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)

View File

@@ -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 = \

View File

@@ -32,6 +32,9 @@
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#include <stdio.h>

View File

@@ -1,6 +1,4 @@
/*
$Id: utf8.c,v 1.5 2008/04/22 15:29:12 karl Exp $
Copyright (C) 2006, 2008 Burkhard Plaum <plaum@ipf.uni-stuttgart.de>
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)

View File

@@ -26,6 +26,9 @@
#include "getopt.h"
#include <stdarg.h>
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#ifdef HAVE_CDDB
#include <cddb/cddb.h>
#include "cddb.h"