2004-02-21 18:35:16 +00:00
|
|
|
dnl Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
2003-04-25 21:26:47 +00:00
|
|
|
dnl
|
|
|
|
|
dnl This program is free software; you can redistribute it and/or modify
|
|
|
|
|
dnl it under the terms of the GNU General Public License as published by
|
|
|
|
|
dnl the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
|
dnl any later version.
|
|
|
|
|
dnl
|
|
|
|
|
dnl This program is distributed in the hope that it will be useful,
|
|
|
|
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
dnl GNU General Public License for more details.
|
|
|
|
|
dnl
|
|
|
|
|
dnl You should have received a copy of the GNU General Public License
|
|
|
|
|
dnl along with this program; if not, write to the Free Software
|
|
|
|
|
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
|
dnl 02111-1307, USA.
|
|
|
|
|
|
2004-11-21 22:32:03 +00:00
|
|
|
define(RELEASE_NUM, 72)
|
|
|
|
|
define(CDIO_VERSION_STR, 0.$1cvs)
|
2004-03-20 12:41:23 +00:00
|
|
|
|
2003-10-04 19:16:01 +00:00
|
|
|
AC_PREREQ(2.52)
|
2004-12-09 01:03:29 +00:00
|
|
|
AC_REVISION([$Id: configure.ac,v 1.117 2004/12/09 01:03:29 rocky Exp $])dnl
|
2004-03-20 12:41:23 +00:00
|
|
|
AC_INIT(libcdio, CDIO_VERSION_STR(RELEASE_NUM))
|
2003-10-28 16:23:49 +00:00
|
|
|
AC_CONFIG_SRCDIR(src/cd-info.c)
|
2004-11-06 12:29:37 +00:00
|
|
|
AM_INIT_AUTOMAKE
|
2004-10-23 20:55:08 +00:00
|
|
|
|
2004-02-27 02:35:24 +00:00
|
|
|
AC_CANONICAL_HOST
|
2003-09-22 01:05:15 +00:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
|
|
2004-03-20 12:41:23 +00:00
|
|
|
LIBCDIO_VERSION_NUM=RELEASE_NUM
|
|
|
|
|
AC_SUBST(LIBCDIO_VERSION_NUM)
|
|
|
|
|
|
2003-09-22 01:05:15 +00:00
|
|
|
AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
|
2004-02-21 18:35:16 +00:00
|
|
|
AM_MISSING_PROG(CVS2CL, cvs2cl, $missing_dir)
|
2003-09-22 01:05:15 +00:00
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
|
2003-03-24 19:01:09 +00:00
|
|
|
AM_SANITY_CHECK
|
|
|
|
|
|
2003-09-19 04:39:50 +00:00
|
|
|
AC_ARG_WITH(cd_info,
|
|
|
|
|
[ --without-cd-info build program cd-info (enabled by default)],
|
|
|
|
|
enable_cd_info="${withval}", enable_cd_info=yes)
|
|
|
|
|
|
|
|
|
|
AC_ARG_WITH(cd_read,
|
|
|
|
|
[ --without-cd-read build program cd-read (enabled by default)],
|
|
|
|
|
enable_cd_read="${withval}", enable_cd_read=yes)
|
2003-03-30 01:11:56 +00:00
|
|
|
|
2004-02-28 03:57:41 +00:00
|
|
|
AC_ARG_WITH(versioned_libs,
|
2004-03-20 03:15:35 +00:00
|
|
|
[ --without-versioned-libs build versioned library symbols (enabled by default if you have GNU ld)],
|
2004-02-27 02:35:24 +00:00
|
|
|
enable_versioned_libs="${withval}", enable_versioned_libs=yes)
|
|
|
|
|
|
2004-10-28 11:13:40 +00:00
|
|
|
AC_ARG_WITH(cd_info,
|
|
|
|
|
[ --without-cd-info build program cd-info (enabled by default)],
|
|
|
|
|
enable_cd_info="${withval}", enable_cd_info=yes)
|
|
|
|
|
|
2004-11-22 01:03:52 +00:00
|
|
|
AC_ARG_ENABLE(vcd_info,
|
|
|
|
|
[ --disable-cpp don't make C++ example programs],
|
|
|
|
|
enable_cpp=no,
|
|
|
|
|
enable_cpp=yes)
|
2004-10-28 11:13:40 +00:00
|
|
|
|
2004-11-22 01:03:52 +00:00
|
|
|
dnl We use C
|
|
|
|
|
AC_PROG_CC
|
|
|
|
|
dnl We also use C++ in example programs
|
|
|
|
|
AC_PROG_CXX
|
2004-10-28 11:13:40 +00:00
|
|
|
|
2003-03-24 19:01:09 +00:00
|
|
|
dnl Checks for programs.
|
2004-11-07 19:26:03 +00:00
|
|
|
AC_AIX
|
2003-03-24 19:01:09 +00:00
|
|
|
|
2004-05-04 12:06:40 +00:00
|
|
|
cd_drivers='cdrdao, BIN/CUE, NRG'
|
2003-06-10 01:19:15 +00:00
|
|
|
|
2003-03-24 19:01:09 +00:00
|
|
|
if test "x$GCC" != "xyes"
|
|
|
|
|
then
|
|
|
|
|
echo "*** non GNU CC compiler detected."
|
|
|
|
|
echo "*** This package has not been tested very well with non GNU compilers"
|
|
|
|
|
echo "*** you should try to use 'gcc' for compiling this package."
|
|
|
|
|
else
|
2003-09-01 22:50:25 +00:00
|
|
|
WARN_CFLAGS="-Wall -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -Wunused -Wpointer-arith -Wwrite-strings -Wnested-externs -Wno-sign-compare"
|
2003-03-24 19:01:09 +00:00
|
|
|
|
|
|
|
|
for WOPT in $WARN_CFLAGS; do
|
|
|
|
|
SAVE_CFLAGS="$CFLAGS"
|
|
|
|
|
CFLAGS="$CFLAGS $WOPT"
|
|
|
|
|
AC_MSG_CHECKING([whether $CC understands $WOPT])
|
|
|
|
|
AC_TRY_COMPILE([], [], has_option=yes, has_option=no,)
|
|
|
|
|
CFLAGS="$SAVE_CFLAGS"
|
|
|
|
|
AC_MSG_RESULT($has_option)
|
|
|
|
|
if test $has_option = yes; then
|
|
|
|
|
warning_flags="$warning_flags $option"
|
|
|
|
|
fi
|
|
|
|
|
unset has_option
|
|
|
|
|
unset SAVE_CFLAGS
|
|
|
|
|
done
|
|
|
|
|
WARNING_FLAGS="$warning_flags"
|
|
|
|
|
unset warning_flags
|
|
|
|
|
fi
|
|
|
|
|
|
2004-02-28 03:57:41 +00:00
|
|
|
# We use Perl for documentation and regression tests
|
2003-03-24 19:01:09 +00:00
|
|
|
AC_PATH_PROG(PERL, perl, no)
|
2003-06-08 13:08:37 +00:00
|
|
|
AC_SUBST(PERL)
|
|
|
|
|
|
2004-02-28 03:57:41 +00:00
|
|
|
# We use a diff in regression testing
|
2003-06-08 13:08:37 +00:00
|
|
|
AC_PATH_PROG(DIFF, diff, no)
|
|
|
|
|
DIFF_OPTS=
|
|
|
|
|
|
2003-06-10 01:19:15 +00:00
|
|
|
if test "$DIFF" = no ; then
|
2003-06-08 13:08:37 +00:00
|
|
|
AC_PATH_PROG(DIFF, cmp, no)
|
|
|
|
|
else
|
2004-02-28 03:57:41 +00:00
|
|
|
# Try for GNU diff options.
|
2003-06-08 13:08:37 +00:00
|
|
|
# MSDOG output uses \r\n rather than \n in tests
|
|
|
|
|
for diff_opt in -w --unified ; do
|
|
|
|
|
if $DIFF $diff_opt ./configure ./configure > /dev/null 2>&1; then
|
|
|
|
|
AC_MSG_RESULT([adding $diff_opt to diff in regression tests])
|
|
|
|
|
DIFF_OPTS="$DIFF_OPTS $diff_opt"
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
fi
|
|
|
|
|
AC_SUBST(DIFF)
|
|
|
|
|
AC_SUBST(DIFF_OPTS)
|
2003-06-08 12:33:37 +00:00
|
|
|
|
2004-05-07 11:00:27 +00:00
|
|
|
AM_PATH_LIBPOPT(,
|
2004-05-08 10:50:51 +00:00
|
|
|
[AC_MSG_WARN([Diagnostic programs cd-drive, cd-info, cd-read, iso-info, and is-read will not get built.])
|
2004-05-07 11:00:27 +00:00
|
|
|
enable_cd_info=no])
|
2003-03-24 19:01:09 +00:00
|
|
|
|
|
|
|
|
dnl headers
|
|
|
|
|
|
2004-05-09 17:03:27 +00:00
|
|
|
AC_HEADER_STDC
|
2004-11-06 16:10:27 +00:00
|
|
|
AC_CHECK_HEADERS(errno.h fcntl.h stdio.h sys/cdio.h glob.h stdbool.h stdarg.h)
|
2003-03-24 19:01:09 +00:00
|
|
|
|
|
|
|
|
dnl compiler
|
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
|
AC_C_CONST
|
|
|
|
|
AC_C_INLINE
|
|
|
|
|
|
|
|
|
|
dnl ISOC99_PRAGMA
|
|
|
|
|
AC_MSG_CHECKING([whether $CC supports ISOC99 _Pragma()])
|
|
|
|
|
AC_TRY_COMPILE([],[_Pragma("pack(1)")], [
|
|
|
|
|
ISOC99_PRAGMA=yes
|
|
|
|
|
AC_DEFINE(HAVE_ISOC99_PRAGMA, [], [Supports ISO _Pragma() macro])
|
|
|
|
|
],ISOC99_PRAGMA=no)
|
|
|
|
|
AC_MSG_RESULT($ISOC99_PRAGMA)
|
|
|
|
|
|
|
|
|
|
dnl empty_array_size
|
|
|
|
|
AC_MSG_CHECKING([how to create empty arrays])
|
|
|
|
|
|
|
|
|
|
empty_array_size="xxx"
|
|
|
|
|
AC_TRY_COMPILE([],[struct { int foo; int bar[]; } doo;], empty_array_size="")
|
|
|
|
|
|
|
|
|
|
if test "x$empty_array_size" = "xxxx";then
|
|
|
|
|
AC_TRY_COMPILE([],[struct { int foo; int bar[0]; } doo;], empty_array_size="0")
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if test "x$empty_array_size" = "xxxx"
|
|
|
|
|
then
|
|
|
|
|
AC_MSG_ERROR([compiler is unable to creaty empty arrays])
|
|
|
|
|
else
|
|
|
|
|
AC_DEFINE_UNQUOTED(EMPTY_ARRAY_SIZE, $empty_array_size,
|
|
|
|
|
[what to put between the brackets for empty arrays])
|
|
|
|
|
changequote(`,')
|
|
|
|
|
msg="[${empty_array_size}]"
|
|
|
|
|
changequote([,])
|
|
|
|
|
AC_MSG_RESULT($msg)
|
|
|
|
|
fi
|
|
|
|
|
dnl empty_array_size
|
|
|
|
|
|
|
|
|
|
dnl bitfield order
|
|
|
|
|
AC_MSG_CHECKING(bitfield ordering in structs)
|
|
|
|
|
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])))
|
|
|
|
|
if test "x$bf_lsbf" = "x1"; then
|
|
|
|
|
AC_MSG_RESULT(LSBF)
|
|
|
|
|
AC_DEFINE(BITFIELD_LSBF, [], [compiler does lsbf in struct bitfields])
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT(MSBF)
|
|
|
|
|
fi
|
|
|
|
|
dnl
|
|
|
|
|
|
2004-03-20 03:15:35 +00:00
|
|
|
dnl AM_PROG_LIBTOOL tests whether we have GNU ld
|
|
|
|
|
dnl this must come before checking --with-versioned-libs
|
|
|
|
|
dnl which requires GNU ld.
|
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
|
|
2003-03-24 19:01:09 +00:00
|
|
|
dnl system
|
2003-06-07 01:20:40 +00:00
|
|
|
|
2004-11-07 19:26:03 +00:00
|
|
|
# FIXME:
|
|
|
|
|
# I believe some OS's require -lm, but I don't recall for what function
|
|
|
|
|
# When we find it, put it in below instead of "cos".
|
|
|
|
|
AC_CHECK_LIB(m, cos, [LIBS="$LIBS -lm"])
|
2003-03-24 19:01:09 +00:00
|
|
|
CFLAGS="$CFLAGS $WARN_CFLAGS"
|
|
|
|
|
|
2004-11-16 00:12:24 +00:00
|
|
|
# Do we have GNU ld? If we don't, we can't build versioned symbols.
|
|
|
|
|
if test "$with_gnu_ld" != yes; then
|
|
|
|
|
AC_MSG_WARN([I don't see GNU ld. I'm going to assume --without-versioned-libs])
|
|
|
|
|
enable_versioned_libs='no'
|
|
|
|
|
fi
|
|
|
|
|
# We also need GNU make to build versioned symbols.
|
2004-02-28 03:57:41 +00:00
|
|
|
if test "x$enable_versioned_libs" = "xyes" ; then
|
|
|
|
|
if test -n "$MAKE" ; then
|
|
|
|
|
$MAKE --version 2>/dev/null >/dev/null
|
|
|
|
|
if test "$?" -ne 0 ; then
|
|
|
|
|
AC_MSG_ERROR(Either set MAKE variable to GNU make or use
|
|
|
|
|
--without-versioned-libs option)
|
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
make --version 2>/dev/null >/dev/null
|
|
|
|
|
if test "$?" -ne 0 ; then
|
|
|
|
|
AC_MSG_ERROR(Either set MAKE variable to GNU make or use
|
|
|
|
|
--without-versioned-libs option)
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
AM_CONDITIONAL(CYGWIN, test "x$CYGWIN" = "xyes")
|
2003-09-19 04:39:50 +00:00
|
|
|
AM_CONDITIONAL(BUILD_CDINFO, test "x$enable_cd_info" = "xyes")
|
|
|
|
|
AM_CONDITIONAL(BUILD_CDINFO_LINUX, test "x$enable_cd_info_linux" = "xyes")
|
2003-03-29 17:32:00 +00:00
|
|
|
AM_CONDITIONAL(BUILD_CDIOTEST, test "x$enable_cdiotest" = "xyes")
|
2004-02-27 02:35:24 +00:00
|
|
|
AM_CONDITIONAL(BUILD_VERSIONED_LIBS, test "x$enable_versioned_libs" = "xyes")
|
2004-11-22 01:03:52 +00:00
|
|
|
AM_CONDITIONAL(DISABLE_CPP, test "x$disable_cpp" = "xyes")
|
2003-03-24 19:01:09 +00:00
|
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
|
|
2004-06-02 08:23:55 +00:00
|
|
|
LIBCDIO_CFLAGS='-I$(top_srcdir)/lib/ -I$(top_srcdir)/include/'
|
2003-03-24 19:01:09 +00:00
|
|
|
LIBCDIO_LIBS='$(top_builddir)/lib/libcdio.la'
|
2003-08-17 05:31:19 +00:00
|
|
|
LIBISO9660_LIBS='$(top_builddir)/lib/libiso9660.la'
|
2003-03-24 19:01:09 +00:00
|
|
|
AC_SUBST(LIBCDIO_CFLAGS)
|
|
|
|
|
AC_SUBST(LIBCDIO_LIBS)
|
2003-08-17 05:31:19 +00:00
|
|
|
AC_SUBST(LIBISO9660_LIBS)
|
2003-03-24 19:01:09 +00:00
|
|
|
|
2004-06-27 16:25:16 +00:00
|
|
|
case $host_os in
|
2004-05-31 15:21:48 +00:00
|
|
|
darwin6*|darwin7*)
|
2003-09-15 12:05:10 +00:00
|
|
|
AC_CHECK_HEADERS(IOKit/IOKitLib.h CoreFoundation/CFBase.h,
|
|
|
|
|
[have_iokit_h="yes"])
|
|
|
|
|
if test "x$have_iokit_h" = "xyes" ; then
|
|
|
|
|
AC_DEFINE([HAVE_DARWIN_CDROM], [1],
|
|
|
|
|
[Define 1 if you have Darwin OS X-type CD-ROM support])
|
2004-08-19 02:50:35 +00:00
|
|
|
LIBCDIO_LIBS="$LIBCDIO_LIBS -Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,IOKit"
|
|
|
|
|
DARWIN_PKG_LIB_HACK=" -Wl,-framework -Wl,CoreFoundation \"-Wl,-framework -Wl,IOKit\""
|
2003-09-15 12:05:10 +00:00
|
|
|
cd_drivers="${cd_drivers}, Darwin"
|
|
|
|
|
fi
|
2003-09-13 06:25:36 +00:00
|
|
|
;;
|
2003-03-24 19:01:09 +00:00
|
|
|
linux*)
|
|
|
|
|
AC_CHECK_HEADERS(linux/version.h)
|
|
|
|
|
AC_CHECK_HEADERS(linux/cdrom.h, [have_linux_cdrom_h="yes"])
|
|
|
|
|
if test "x$have_linux_cdrom_h" = "xyes" ; then
|
|
|
|
|
AC_TRY_COMPILE(,[
|
|
|
|
|
#include <linux/cdrom.h>
|
|
|
|
|
struct cdrom_generic_command test;
|
|
|
|
|
int has_timeout=sizeof(test.timeout);],
|
|
|
|
|
[AC_DEFINE([HAVE_LINUX_CDROM_TIMEOUT], [1],
|
|
|
|
|
[Define 1 if timeout is in cdrom_generic_command struct])])
|
2003-06-10 01:19:15 +00:00
|
|
|
AC_DEFINE([HAVE_LINUX_CDROM], [1],
|
|
|
|
|
[Define 1 if you have Linux-type CD-ROM support])
|
2003-09-15 12:05:10 +00:00
|
|
|
cd_drivers="${cd_drivers}, GNU/Linux"
|
2003-03-24 19:01:09 +00:00
|
|
|
fi
|
|
|
|
|
;;
|
|
|
|
|
bsdi*)
|
2003-03-30 12:59:37 +00:00
|
|
|
AC_CHECK_HEADERS(dvd.h, [have_bsdi_dvd_h="yes"])
|
|
|
|
|
if test "x$have_bsdi_dvd_h" = "xyes" ; then
|
|
|
|
|
AC_DEFINE([HAVE_BSDI_CDROM], [1],
|
|
|
|
|
[Define 1 if you have BSDI-type CD-ROM support])
|
|
|
|
|
LIBS="$LIBS -ldvd"
|
2003-09-15 12:05:10 +00:00
|
|
|
cd_drivers="${cd_drivers}, BSDI"
|
2003-03-30 12:59:37 +00:00
|
|
|
fi
|
2003-03-24 19:01:09 +00:00
|
|
|
;;
|
|
|
|
|
sunos*|sun*|solaris*)
|
|
|
|
|
AC_DEFINE([HAVE_SOLARIS_CDROM], [1],
|
|
|
|
|
[Define 1 if you have Solaris CD-ROM support])
|
2003-09-15 12:05:10 +00:00
|
|
|
cd_drivers="${cd_drivers}, Solaris"
|
2003-03-24 19:01:09 +00:00
|
|
|
;;
|
2003-06-07 08:53:16 +00:00
|
|
|
cygwin*)
|
|
|
|
|
AC_DEFINE([CYGWIN], [1],
|
|
|
|
|
[Define 1 if you are compiling using cygwin])
|
2003-06-10 01:19:15 +00:00
|
|
|
AC_DEFINE([HAVE_WIN32_CDROM], [1],
|
|
|
|
|
[Define 1 if you have MinGW CD-ROM support])
|
2004-03-10 11:53:10 +00:00
|
|
|
LIBS="$LIBS -lwinmm"
|
2003-09-15 12:05:10 +00:00
|
|
|
cd_drivers="${cd_drivers}, MinGW"
|
2003-06-07 08:53:16 +00:00
|
|
|
;;
|
|
|
|
|
mingw*)
|
|
|
|
|
AC_DEFINE([MINGW32], [1],
|
|
|
|
|
[Define 1 if you are compiling using MinGW])
|
2003-05-27 02:55:58 +00:00
|
|
|
AC_DEFINE([HAVE_WIN32_CDROM], [1],
|
2003-06-10 01:19:15 +00:00
|
|
|
[Define 1 if you have MinGW CD-ROM support])
|
2003-06-07 01:20:40 +00:00
|
|
|
LIBS="$LIBS -lwinmm -mwindows"
|
2003-09-15 12:05:10 +00:00
|
|
|
cd_drivers="${cd_drivers}, MinGW "
|
2003-05-27 02:55:58 +00:00
|
|
|
;;
|
2004-12-09 01:03:29 +00:00
|
|
|
freebsd4.*|freebsd5.*|freebsd6*)
|
2003-10-03 07:54:58 +00:00
|
|
|
AC_DEFINE([HAVE_FREEBSD_CDROM], [1],
|
|
|
|
|
[Define 1 if you have FreeBSD CD-ROM support])
|
2004-05-03 03:22:24 +00:00
|
|
|
LIBS="$LIBS -lcam"
|
2003-10-03 07:54:58 +00:00
|
|
|
cd_drivers="${cd_drivers}, FreeBSD "
|
|
|
|
|
;;
|
2003-03-24 19:01:09 +00:00
|
|
|
*)
|
2004-10-28 11:13:40 +00:00
|
|
|
AC_MSG_WARN([Don't have OS CD-reading support for ${host_os}...])
|
|
|
|
|
AC_MSG_WARN([Will use generic support.])
|
2003-03-24 19:01:09 +00:00
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
AC_SUBST(LINUX_CDROM_TIMEOUT)
|
2004-08-19 01:12:27 +00:00
|
|
|
AC_SUBST(DARWIN_PKG_LIB_HACK)
|
2003-03-24 19:01:09 +00:00
|
|
|
AC_SUBST(HAVE_BSDI_CDROM)
|
2003-10-03 07:54:58 +00:00
|
|
|
AC_SUBST(HAVE_DARWIN_CDROM)
|
|
|
|
|
AC_SUBST(HAVE_FREEBSD_CDROM)
|
|
|
|
|
AC_SUBST(HAVE_LINUX_CDROM)
|
2003-03-24 19:01:09 +00:00
|
|
|
AC_SUBST(HAVE_SOLARIS_CDROM)
|
2003-05-27 02:55:58 +00:00
|
|
|
AC_SUBST(HAVE_WIN32_CDROM)
|
2003-03-24 19:01:09 +00:00
|
|
|
|
2004-10-24 11:20:30 +00:00
|
|
|
LIBCDIO_SOURCE_PATH="`pwd`"
|
2004-11-01 08:35:22 +00:00
|
|
|
AC_DEFINE_UNQUOTED(LIBCDIO_SOURCE_PATH, "$LIBCDIO_SOURCE_PATH",
|
2004-10-24 11:20:30 +00:00
|
|
|
[Full path to libcdio top_sourcedir.])
|
|
|
|
|
AC_SUBST(LIBCDIO_SOURCE_PATH)
|
|
|
|
|
|
2004-10-31 13:58:44 +00:00
|
|
|
AC_CHECK_FUNCS( [bzero ftruncate memcpy memset snprintf \
|
|
|
|
|
tzset vsnprintf] )
|
2003-09-19 04:39:50 +00:00
|
|
|
|
2003-09-21 07:43:39 +00:00
|
|
|
AC_CHECK_MEMBER([struct tm.tm_gmtoff],
|
|
|
|
|
[AC_DEFINE(HAVE_TM_GMTOFF, 1,
|
|
|
|
|
[Define if struct tm has the tm_gmtoff member.])],
|
|
|
|
|
,
|
|
|
|
|
[#include <time.h>])
|
|
|
|
|
|
2004-10-30 00:38:43 +00:00
|
|
|
if test $ac_cv_member_struct_tm_tm_gmtoff = yes ; then
|
|
|
|
|
AC_MSG_CHECKING([whether time.h defines daylight and timezone variables])
|
|
|
|
|
AC_TRY_RUN([
|
|
|
|
|
#include <time.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern char *tzname[2];
|
|
|
|
|
extern long timezone;
|
|
|
|
|
extern int daylight;
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
main() {
|
|
|
|
|
return (timezone != 0) + daylight;
|
|
|
|
|
}
|
|
|
|
|
],[AC_DEFINE(HAVE_DAYLIGHT, 1,
|
|
|
|
|
[Define if time.h defines extern long timezone and int daylight vars.])
|
|
|
|
|
has_daylight=yes
|
|
|
|
|
],[has_daylight=no])
|
2004-10-30 02:55:17 +00:00
|
|
|
AC_MSG_RESULT($has_daylight)
|
|
|
|
|
AC_MSG_CHECKING([whether time.h defines tzname variable])
|
|
|
|
|
AC_TRY_RUN([
|
|
|
|
|
#include <time.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern char *tzname[2];
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
main() {
|
|
|
|
|
return (tzname != NULL);
|
|
|
|
|
}
|
|
|
|
|
],[AC_DEFINE(HAVE_TZNAME, 1,
|
|
|
|
|
[Define if time.h defines extern extern char *tzname[2] variable])
|
|
|
|
|
has_tzname=yes
|
|
|
|
|
],[has_tzname=no])
|
|
|
|
|
AC_MSG_RESULT($has_tzname)
|
2004-10-30 00:38:43 +00:00
|
|
|
fi
|
|
|
|
|
|
2004-10-28 11:13:40 +00:00
|
|
|
if test x$enable_joliet = x; then
|
|
|
|
|
AC_ARG_ENABLE(joliet,
|
|
|
|
|
[ --disable-joliet don't include Joliet extension support],
|
|
|
|
|
enable_joliet=no,
|
|
|
|
|
enable_joliet=yes)
|
|
|
|
|
fi
|
|
|
|
|
if test x$enable_joliet = xyes; then
|
|
|
|
|
AM_ICONV
|
2004-10-31 13:58:44 +00:00
|
|
|
AM_LANGINFO_CODESET
|
2004-10-28 11:13:40 +00:00
|
|
|
if test "$am_cv_func_iconv" = yes ; then
|
2004-10-31 03:10:25 +00:00
|
|
|
AC_DEFINE(HAVE_JOLIET, [1],
|
|
|
|
|
[Define 1 if you want ISO-9660 Joliet extension support.
|
|
|
|
|
You must have also libiconv installed to get Joliet extension support.])
|
2004-10-28 11:13:40 +00:00
|
|
|
else
|
|
|
|
|
AC_MSG_WARN([You must have iconv installed to get Joliet extension support.])
|
|
|
|
|
fi
|
|
|
|
|
fi
|
2004-11-07 19:26:03 +00:00
|
|
|
AC_SUBST(HAVE_JOLIET)
|
2004-10-28 11:13:40 +00:00
|
|
|
|
2003-04-14 04:29:24 +00:00
|
|
|
if test x$enable_cddb = x; then
|
|
|
|
|
AC_ARG_ENABLE(cddb,
|
2003-09-19 04:39:50 +00:00
|
|
|
[ --disable-cddb don't include CDDB lookups in cd_info],
|
2003-04-14 04:29:24 +00:00
|
|
|
enable_cddb=no,
|
|
|
|
|
enable_cddb=yes)
|
|
|
|
|
fi
|
|
|
|
|
if test x$enable_cddb = xyes; then
|
2003-06-01 21:05:45 +00:00
|
|
|
PKG_CHECK_MODULES(CDDB, libcddb >= 0.9.4, [
|
2003-04-20 01:39:23 +00:00
|
|
|
HAVE_CDDB=yes
|
|
|
|
|
AC_DEFINE(HAVE_CDDB, [], [Define this if you have libcddb installed])
|
|
|
|
|
],
|
2004-10-28 11:13:40 +00:00
|
|
|
[AC_MSG_WARN([new enough libcddb not found. CDDB access disabled. Get libcddb from http://libcddb.sourceforge.net])
|
2003-06-01 21:05:45 +00:00
|
|
|
HAVE_CDDB=no])
|
2003-05-20 08:10:45 +00:00
|
|
|
AC_CHECK_LIB(socket, connect)
|
|
|
|
|
AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname))
|
2003-04-14 04:29:24 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
2003-09-01 02:07:52 +00:00
|
|
|
AC_SUBST(CDDB_LIBS)
|
2003-04-14 04:29:24 +00:00
|
|
|
|
2003-09-19 04:39:50 +00:00
|
|
|
if test x$enable_vcd_info = x; then
|
|
|
|
|
AC_ARG_ENABLE(vcd_info,
|
|
|
|
|
[ --disable-vcd-info don't include Video CD Info from libvcd],
|
|
|
|
|
enable_vcd_info=no,
|
|
|
|
|
enable_vcd_info=yes)
|
2003-04-26 14:24:44 +00:00
|
|
|
fi
|
2003-09-19 04:39:50 +00:00
|
|
|
if test x$enable_vcd_info = xyes; then
|
2003-12-24 11:05:09 +00:00
|
|
|
PKG_CHECK_MODULES(VCDINFO, libvcdinfo >= 0.7.20,
|
2003-08-10 02:27:49 +00:00
|
|
|
[AC_DEFINE([HAVE_VCDINFO],1,
|
|
|
|
|
[Define this if you have libvcdinfo installed])],
|
2004-02-25 02:01:05 +00:00
|
|
|
[AC_MSG_WARN(a new enough libvcdinfo not found.
|
2004-06-19 16:17:09 +00:00
|
|
|
VCD info display in cd-info disabled.
|
2004-02-25 02:01:05 +00:00
|
|
|
libvcdinfo is part of vcdimager. Get it from http://vcdimager.org)
|
2004-02-22 09:34:15 +00:00
|
|
|
enable_vcd_info=no])
|
2003-04-26 14:24:44 +00:00
|
|
|
fi
|
|
|
|
|
|
2003-08-10 02:27:49 +00:00
|
|
|
AC_SUBST(VCDINFO_LIBS)
|
|
|
|
|
AC_SUBST(VCDINFO_CFLAGS)
|
2003-04-26 14:24:44 +00:00
|
|
|
|
2003-04-20 15:34:31 +00:00
|
|
|
AC_CONFIG_COMMANDS([checks],
|
2003-04-26 14:24:44 +00:00
|
|
|
[chmod +x test/check_cue.sh; chmod +x test/check_nrg.sh
|
2003-04-20 15:34:31 +00:00
|
|
|
])
|
2003-04-19 00:50:39 +00:00
|
|
|
|
2004-10-26 09:00:11 +00:00
|
|
|
AC_CONFIG_FILES([ \
|
2003-03-24 19:01:09 +00:00
|
|
|
Makefile \
|
2003-04-21 10:17:50 +00:00
|
|
|
libcdio.pc \
|
2003-04-25 21:26:47 +00:00
|
|
|
libcdio.spec \
|
2003-08-17 05:31:19 +00:00
|
|
|
libiso9660.pc \
|
2003-09-28 22:11:00 +00:00
|
|
|
example/Makefile \
|
2003-04-19 08:29:13 +00:00
|
|
|
include/Makefile \
|
|
|
|
|
include/cdio/Makefile \
|
2003-04-22 12:09:08 +00:00
|
|
|
include/cdio/version.h \
|
2004-10-24 11:20:30 +00:00
|
|
|
doc/doxygen/Doxyfile \
|
2003-07-28 02:25:37 +00:00
|
|
|
doc/Makefile \
|
2003-03-24 19:01:09 +00:00
|
|
|
lib/Makefile \
|
|
|
|
|
src/Makefile \
|
2003-04-26 14:24:44 +00:00
|
|
|
test/check_nrg.sh \
|
2003-04-22 12:09:08 +00:00
|
|
|
test/check_cue.sh \
|
2004-02-29 04:41:57 +00:00
|
|
|
test/check_iso.sh \
|
2003-06-08 12:33:37 +00:00
|
|
|
test/check_common_fn \
|
2003-04-22 12:09:08 +00:00
|
|
|
test/Makefile \
|
2003-03-24 19:01:09 +00:00
|
|
|
])
|
2003-09-14 07:49:12 +00:00
|
|
|
|
|
|
|
|
AC_CONFIG_COMMANDS([default],[[
|
|
|
|
|
# Make sure scripts are executable
|
|
|
|
|
chmod +x test/check_nrg.sh
|
|
|
|
|
chmod +x test/check_cue.sh
|
2004-02-29 04:41:57 +00:00
|
|
|
chmod +x test/check_iso.sh
|
2003-09-14 07:49:12 +00:00
|
|
|
]],[[]])
|
|
|
|
|
|
2003-08-17 05:31:19 +00:00
|
|
|
AC_OUTPUT
|
2003-04-14 10:03:27 +00:00
|
|
|
|
2003-06-10 01:19:15 +00:00
|
|
|
echo "Using CD-ROM drivers: $cd_drivers"
|