Remove bit-ordering test in configure.ac since we don't seem to use

this at compile time and it fouls up cross compilation.

cd-paranoia has tests at run-time. libcdio inherited this from
vcdimager which needs it in writing images. It is possible that when
libcdio does writing this may come back. Untill then, simplify.
This commit is contained in:
rocky
2008-11-25 01:47:36 +00:00
parent 48de04f1b6
commit 088a2ec17c
2 changed files with 28 additions and 103 deletions

53
INSTALL
View File

@@ -1,8 +1,8 @@
Installation Instructions Installation Instructions
************************* *************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
Software Foundation, Inc. 2006, 2007 Free 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,7 +10,10 @@ unlimited permission to copy, distribute and modify it.
Basic Installation Basic Installation
================== ==================
These are generic installation instructions. Briefly, the shell commands `./configure; make; make install' should
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
@@ -23,9 +26,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
@@ -35,20 +38,17 @@ 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 only need `configure' by a program called `autoconf'. You need `configure.ac' if
`configure.ac' if you want to change it or regenerate `configure' using you want to change it or regenerate `configure' using a newer version
a newer version of `autoconf'. 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. If you're `./configure' to configure the package for your system.
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' takes awhile. While running, it prints some Running `configure' might take a while. While running, it prints
messages telling which features it is checking for. some messages telling which features it is checking for.
2. Type `make' to compile the package. 2. Type `make' to compile the package.
@@ -67,6 +67,9 @@ 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
===================== =====================
@@ -78,7 +81,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=c89 CFLAGS=-O2 LIBS=-lposix ./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details. *Note Defining Variables::, for more details.
@@ -87,17 +90,15 @@ 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 must use a version of `make' that own directory. To do this, you can use GNU `make'. `cd' to the
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 `..'.
If you have to use a `make' that does not support the `VPATH' With a non-GNU `make', it is safer to compile the package for one
variable, you have to compile the package for one architecture at a architecture at a time in the source code directory. After you have
time in the source code directory. After you have installed the installed the package for one architecture, use `make distclean' before
package for one architecture, use `make distclean' before reconfiguring reconfiguring for another architecture.
for another architecture.
Installation Names Installation Names
================== ==================
@@ -190,12 +191,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). Here is a another example: overridden in the site shell script).
/bin/bash ./configure CONFIG_SHELL=/bin/bash Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug. Until the bug is fixed you can use this workaround:
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
configuration-related scripts to be executed by `/bin/bash'.
`configure' Invocation `configure' Invocation
====================== ======================

View File

@@ -20,7 +20,7 @@ define(RELEASE_NUM, 82cvs)
define(CDIO_VERSION_STR, 0.$1) define(CDIO_VERSION_STR, 0.$1)
AC_PREREQ(2.52) AC_PREREQ(2.52)
AC_REVISION([$Id: configure.ac,v 1.234 2008/10/29 09:55:22 rocky Exp $])dnl AC_REVISION([$Id: configure.ac,v 1.235 2008/11/25 01:47:36 rocky Exp $])dnl
AC_INIT(libcdio, CDIO_VERSION_STR(RELEASE_NUM)) AC_INIT(libcdio, CDIO_VERSION_STR(RELEASE_NUM))
AC_CONFIG_SRCDIR(src/cd-info.c) AC_CONFIG_SRCDIR(src/cd-info.c)
@@ -278,82 +278,6 @@ else
changequote([,]) changequote([,])
AC_MSG_RESULT($msg) AC_MSG_RESULT($msg)
fi fi
dnl empty_array_size
dnl bitfield order
AC_MSG_CHECKING(bitfield ordering in structs)
dnl First see whether we can work out ordering without running a program --
dnl for instance, when cross-compiling
boring_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -O2"
AC_LINK_IFELSE([
int conftest_undefined_reference_();
int main() {
union {
unsigned int x;
struct {
unsigned int x0: 1;
unsigned int x1: 31;
} s;
} u;
u.x = 0;
u.s.x0 = 1;
if (u.x == 1)
return conftest_undefined_reference_();
return 0;
}
], [bf_lsbf=0])
AC_LINK_IFELSE([
int conftest_undefined_reference_();
int main() {
union {
unsigned int x;
struct {
unsigned int x0: 1;
unsigned int x1: 31;
} s;
} u;
u.x = 0;
u.s.x0 = 1;
if (u.x == 0x80000000)
return conftest_undefined_reference_();
return 0;
}
], [bf_lsbf=1])
CFLAGS="$boring_CFLAGS"
dnl If we haven't found out for certain yet, try the runtime test
if test "x$bf_lsbf" = "x"; then
AC_TRY_RUN([
int
main() {
struct { char bit_0:1, bit_12:2, bit_345:3, bit_67:2; }
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
__attribute__((packed))
#endif
bf = { 1,1,1,1 };
if (sizeof (bf) != 1) return 1;
return *((unsigned char*) &bf) != 0x4b; }
], bf_lsbf=1, AC_TRY_RUN([
int
main() {
struct { char bit_0:1, bit_12:2, bit_345:3, bit_67:2; }
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
__attribute__((packed))
#endif
bf = { 1,1,1,1 };
if (sizeof (bf) != 1) return 1;
return *((unsigned char*) &bf) != 0xa5; }
], bf_lsbf=0, AC_MSG_ERROR([unsupported bitfield ordering])))
fi
if test "x$bf_lsbf" = "x1"; then
AC_MSG_RESULT(LSBF)
AC_DEFINE(BITFIELD_LSBF, [], [compiler does least-significant bit first in struct bitfields])
else
AC_MSG_RESULT(MSBF)
fi
dnl
dnl Enable the creation of shared libraries under Win32. dnl Enable the creation of shared libraries under Win32.
AC_LIBTOOL_WIN32_DLL AC_LIBTOOL_WIN32_DLL