Allow compiling cd-info without cddb. Patch thanks to Fabrice Ménard.
This commit is contained in:
53
INSTALL
53
INSTALL
@@ -1,8 +1,8 @@
|
|||||||
Installation Instructions
|
Installation Instructions
|
||||||
*************************
|
*************************
|
||||||
|
|
||||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
|
||||||
2006, 2007 Free Software Foundation, Inc.
|
Software Foundation, Inc.
|
||||||
|
|
||||||
This file is free documentation; the Free Software Foundation gives
|
This file is free documentation; the Free Software Foundation gives
|
||||||
unlimited permission to copy, distribute and modify it.
|
unlimited permission to copy, distribute and modify it.
|
||||||
@@ -10,10 +10,7 @@ unlimited permission to copy, distribute and modify it.
|
|||||||
Basic Installation
|
Basic Installation
|
||||||
==================
|
==================
|
||||||
|
|
||||||
Briefly, the shell commands `./configure; make; make install' should
|
These are generic installation instructions.
|
||||||
configure, build, and install this package. The following
|
|
||||||
more-detailed instructions are generic; see the `README' file for
|
|
||||||
instructions specific to this package.
|
|
||||||
|
|
||||||
The `configure' shell script attempts to guess correct values for
|
The `configure' shell script attempts to guess correct values for
|
||||||
various system-dependent variables used during compilation. It uses
|
various system-dependent variables used during compilation. It uses
|
||||||
@@ -26,9 +23,9 @@ debugging `configure').
|
|||||||
|
|
||||||
It can also use an optional file (typically called `config.cache'
|
It can also use an optional file (typically called `config.cache'
|
||||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||||
the results of its tests to speed up reconfiguring. Caching is
|
the results of its tests to speed up reconfiguring. (Caching is
|
||||||
disabled by default to prevent problems with accidental use of stale
|
disabled by default to prevent problems with accidental use of stale
|
||||||
cache files.
|
cache files.)
|
||||||
|
|
||||||
If you need to do unusual things to compile the package, please try
|
If you need to do unusual things to compile the package, please try
|
||||||
to figure out how `configure' could check whether to do them, and mail
|
to figure out how `configure' could check whether to do them, and mail
|
||||||
@@ -38,17 +35,20 @@ some point `config.cache' contains results you don't want to keep, you
|
|||||||
may remove or edit it.
|
may remove or edit it.
|
||||||
|
|
||||||
The file `configure.ac' (or `configure.in') is used to create
|
The file `configure.ac' (or `configure.in') is used to create
|
||||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
`configure' by a program called `autoconf'. You only need
|
||||||
you want to change it or regenerate `configure' using a newer version
|
`configure.ac' if you want to change it or regenerate `configure' using
|
||||||
of `autoconf'.
|
a newer version of `autoconf'.
|
||||||
|
|
||||||
The simplest way to compile this package is:
|
The simplest way to compile this package is:
|
||||||
|
|
||||||
1. `cd' to the directory containing the package's source code and type
|
1. `cd' to the directory containing the package's source code and type
|
||||||
`./configure' to configure the package for your system.
|
`./configure' to configure the package for your system. If you're
|
||||||
|
using `csh' on an old version of System V, you might need to type
|
||||||
|
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||||
|
`configure' itself.
|
||||||
|
|
||||||
Running `configure' might take a while. While running, it prints
|
Running `configure' takes awhile. While running, it prints some
|
||||||
some messages telling which features it is checking for.
|
messages telling which features it is checking for.
|
||||||
|
|
||||||
2. Type `make' to compile the package.
|
2. Type `make' to compile the package.
|
||||||
|
|
||||||
@@ -67,9 +67,6 @@ The simplest way to compile this package is:
|
|||||||
all sorts of other programs in order to regenerate files that came
|
all sorts of other programs in order to regenerate files that came
|
||||||
with the distribution.
|
with the distribution.
|
||||||
|
|
||||||
6. Often, you can also type `make uninstall' to remove the installed
|
|
||||||
files again.
|
|
||||||
|
|
||||||
Compilers and Options
|
Compilers and Options
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
@@ -81,7 +78,7 @@ details on some of the pertinent environment variables.
|
|||||||
by setting variables in the command line or in the environment. Here
|
by setting variables in the command line or in the environment. Here
|
||||||
is an example:
|
is an example:
|
||||||
|
|
||||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||||
|
|
||||||
*Note Defining Variables::, for more details.
|
*Note Defining Variables::, for more details.
|
||||||
|
|
||||||
@@ -90,15 +87,17 @@ Compiling For Multiple Architectures
|
|||||||
|
|
||||||
You can compile the package for more than one kind of computer at the
|
You can compile the package for more than one kind of computer at the
|
||||||
same time, by placing the object files for each architecture in their
|
same time, by placing the object files for each architecture in their
|
||||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
own directory. To do this, you must use a version of `make' that
|
||||||
|
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||||
directory where you want the object files and executables to go and run
|
directory where you want the object files and executables to go and run
|
||||||
the `configure' script. `configure' automatically checks for the
|
the `configure' script. `configure' automatically checks for the
|
||||||
source code in the directory that `configure' is in and in `..'.
|
source code in the directory that `configure' is in and in `..'.
|
||||||
|
|
||||||
With a non-GNU `make', it is safer to compile the package for one
|
If you have to use a `make' that does not support the `VPATH'
|
||||||
architecture at a time in the source code directory. After you have
|
variable, you have to compile the package for one architecture at a
|
||||||
installed the package for one architecture, use `make distclean' before
|
time in the source code directory. After you have installed the
|
||||||
reconfiguring for another architecture.
|
package for one architecture, use `make distclean' before reconfiguring
|
||||||
|
for another architecture.
|
||||||
|
|
||||||
Installation Names
|
Installation Names
|
||||||
==================
|
==================
|
||||||
@@ -191,12 +190,12 @@ them in the `configure' command line, using `VAR=value'. For example:
|
|||||||
./configure CC=/usr/local2/bin/gcc
|
./configure CC=/usr/local2/bin/gcc
|
||||||
|
|
||||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||||
overridden in the site shell script).
|
overridden in the site shell script). Here is a another example:
|
||||||
|
|
||||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
|
||||||
|
|
||||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
|
||||||
|
configuration-related scripts to be executed by `/bin/bash'.
|
||||||
|
|
||||||
`configure' Invocation
|
`configure' Invocation
|
||||||
======================
|
======================
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: cd-info.c,v 1.154 2008/06/19 15:44:12 flameeyes Exp $
|
$Id: cd-info.c,v 1.155 2008/09/08 14:45:12 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2003, 2004, 2005, 2007, 2008 Rocky Bernstein <rocky@gnu.org>
|
Copyright (C) 2003, 2004, 2005, 2007, 2008 Rocky Bernstein <rocky@gnu.org>
|
||||||
Copyright (C) 1996, 1997, 1998 Gerd Knorr <kraxel@bytesex.org>
|
Copyright (C) 1996, 1997, 1998 Gerd Knorr <kraxel@bytesex.org>
|
||||||
@@ -24,12 +24,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "cddb.h"
|
|
||||||
#include "getopt.h"
|
#include "getopt.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#ifdef HAVE_CDDB
|
#ifdef HAVE_CDDB
|
||||||
#include <cddb/cddb.h>
|
#include <cddb/cddb.h>
|
||||||
|
#include "cddb.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_VCDINFO
|
#ifdef HAVE_VCDINFO
|
||||||
@@ -303,6 +303,7 @@ parse_options (int argc, char *argv[])
|
|||||||
case 'd': opts.debug_level = atoi(optarg); break;
|
case 'd': opts.debug_level = atoi(optarg); break;
|
||||||
case 'T': opts.no_tracks = 1; break;
|
case 'T': opts.no_tracks = 1; break;
|
||||||
case 'A': opts.no_analysis = 1; break;
|
case 'A': opts.no_analysis = 1; break;
|
||||||
|
#ifdef HAVE_CDDB
|
||||||
case 'P': cddb_opts.port = atoi(optarg); break;
|
case 'P': cddb_opts.port = atoi(optarg); break;
|
||||||
case 'H': cddb_opts.http = 1; break;
|
case 'H': cddb_opts.http = 1; break;
|
||||||
case OP_CDDB_SERVER: cddb_opts.server = strdup(optarg); break;
|
case OP_CDDB_SERVER: cddb_opts.server = strdup(optarg); break;
|
||||||
@@ -310,6 +311,7 @@ parse_options (int argc, char *argv[])
|
|||||||
case OP_CDDB_EMAIL: cddb_opts.email = strdup(optarg); break;
|
case OP_CDDB_EMAIL: cddb_opts.email = strdup(optarg); break;
|
||||||
case OP_CDDB_NOCACHE: cddb_opts.disable_cache = 1; break;
|
case OP_CDDB_NOCACHE: cddb_opts.disable_cache = 1; break;
|
||||||
case OP_CDDB_TIMEOUT: cddb_opts.timeout = atoi(optarg); break;
|
case OP_CDDB_TIMEOUT: cddb_opts.timeout = atoi(optarg); break;
|
||||||
|
#endif
|
||||||
case 'v': opts.no_vcd = 1; break;
|
case 'v': opts.no_vcd = 1; break;
|
||||||
case 'I': opts.no_ioctl = 1; break;
|
case 'I': opts.no_ioctl = 1; break;
|
||||||
case 'b': parse_source(OP_SOURCE_BIN); break;
|
case 'b': parse_source(OP_SOURCE_BIN); break;
|
||||||
@@ -627,9 +629,9 @@ print_analysis(int ms_offset, cdio_iso_analysis_t cdio_iso_analysis,
|
|||||||
switch(CDIO_FSTYPE(fs)) {
|
switch(CDIO_FSTYPE(fs)) {
|
||||||
case CDIO_FS_AUDIO:
|
case CDIO_FS_AUDIO:
|
||||||
if (num_audio > 0) {
|
if (num_audio > 0) {
|
||||||
|
#ifdef HAVE_CDDB
|
||||||
printf("Audio CD, CDDB disc ID is %08x\n",
|
printf("Audio CD, CDDB disc ID is %08x\n",
|
||||||
cddb_discid(p_cdio, i_tracks));
|
cddb_discid(p_cdio, i_tracks));
|
||||||
#ifdef HAVE_CDDB
|
|
||||||
if (!opts.no_cddb) print_cddb_info(p_cdio, i_tracks, i_first_track);
|
if (!opts.no_cddb) print_cddb_info(p_cdio, i_tracks, i_first_track);
|
||||||
#endif
|
#endif
|
||||||
print_cdtext_info(p_cdio, i_tracks, i_first_track);
|
print_cdtext_info(p_cdio, i_tracks, i_first_track);
|
||||||
|
|||||||
Reference in New Issue
Block a user