1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/cdaudio.c)
LIBCDAUDIO_VERSION_MAJOR=0
LIBCDAUDIO_VERSION_MINOR=99
LIBCDAUDIO_VERSION_MICRO=12
LIBCDAUDIO_VERSION=$LIBCDAUDIO_VERSION_MAJOR.$LIBCDAUDIO_VERSION_MINOR.$LIBCDAUDIO_VERSION_MICRO
LIBCDAUDIO_VERSION_STRING="0.99.12p2"
PACKAGE=libcdaudio
AM_INIT_AUTOMAKE($PACKAGE, ${LIBCDAUDIO_VERSION_STRING})
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AM_C_PROTOTYPES
AM_PROG_CC_STDC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AM_PROG_LIBTOOL
dnl AC_CANONICAL_HOST
dnl AC_ARG_PROGRAM
# We need to change the name of the installed package on some systems,
# so we don't clash with existing system files. We'll do this by
# prefixing "lib" so it comes out as "libcdaudio.h" and
# "liblibcdaudio.so".
cdaudioname=cdaudio
threads=yes
AC_ARG_ENABLE(threads,
AS_HELP_STRING([--enable-threads],
[build a thread-safe version of libcdaudio (default=guessed)]),
[if test "$enableval" = "yes"
then
threads=yes
else
threads=no
fi])
AC_ARG_ENABLE(xbox-fix,
AS_HELP_STRING([--enable-xbox-fix],
[include fix for compilation on XBox (default=no)]),
[if test "$enableval" = "yes"
then
xbox=1
else
xbox=0
fi],
[xbox=0])
AC_DEFINE_UNQUOTED(XBOX, $xbox, [Nonzero if building on XBox.])
dnl POSIX.4 threads
if test "$threads" = "yes"
then
AC_CHECK_LIB(pthread,pthread_create,threads=-lpthread,threads=no)
echo 'threads='$threads
if test "$threads" = "no"
then
AC_CHECK_LIB(c_r,pthread_create,threads=-lc_r,threads=no)
fi
fi
sys=generic
case "$host" in
*beos*)
cdaudioname=libcdaudio
sys=beos
AC_DEFINE(BEOS_CDAUDIO, , [This symbol will be defined if we are compiling from a BeOS system. In that case, we will use closesocket() instead of close(), and we won't use shutdown() at all.])
LIBS="-lcdaudio $LIBS"
;;
*irix*)
cdaudioname=libcdaudio
sys=irix
AC_DEFINE(IRIX_CDAUDIO, , [This symbol will be declared if we're compiling for an Irix system, and we have access to the Irix cdaudio library to do the dirty work.])
LIBS="-lcdaudio -lmediad -lds $LIBS"
;;
*solaris*)
sys=solaris
AC_DEFINE(SOLARIS_GETMNTENT, , [Quick fix for Solaris.])
AC_DEFINE(BROKEN_SOLARIS_LEADOUT, , [Another quick fix.])
;;
esac
AM_CONDITIONAL([IRIX], [test "$sys" = irix])
AM_CONDITIONAL([BEOS], [test "$sys" = beos])
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h linux/cdrom.h linux/ucdrom.h sys/cdrom.h sys/cdio.h io/cam/cdrom.h stdarg.h mntent.h sys/mntent.h sys/types.h sys/param.h sys/ucred.h sys/mount.h strings.h,,,
[[#if defined (HAVE_SYS_TYPES_H)
# include <sys/types.h>
#endif
#if defined (HAVE_SYS_PARAM_H)
# include <sys/param.h>
#endif
]])
AC_C_CONST
case "$cross_compiling" in
yes)
echo "You are cross compiling. You will need to edit config.h and specify the target machine's endianness and word size manually."
;;
no)
AC_C_BIGENDIAN
AC_CHECK_SIZEOF(long)
;;
esac
AC_HEADER_TIME
AC_PROG_GCC_TRADITIONAL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(gethostbyname gethostbyname_r mkdir socket strerror strstr strtol snprintf getmntinfo strtoul)
AC_FUNC_GETMNTENT
if test "$threads" != "no"
then
AC_DEFINE(HAVE_PTHREAD, , [Define if your system provides POSIX.4 threads.])
CFLAGS="$CFLAGS -D_REENTRANT"
LIBRARY_LIB="$threads $LIBRARY_LIB"
REENTRANT="-D_REENTRANT"
fi
AC_SUBST(REENTRANT)
AC_SUBST(LIBS)
AC_SUBST(LIB_LDADD)
AC_SUBST(LIBCDAUDIO_VERSION)
AC_SUBST(LIBCDAUDIO_VERSION_MAJOR)
AC_SUBST(LIBCDAUDIO_VERSION_MINOR)
AC_SUBST(LIBCDAUDIO_VERSION_MICRO)
AC_SUBST(cdaudioname)
AC_OUTPUT([libcdaudio.pc libcdaudio-config Makefile src/Makefile
src/cdaudio.h], [chmod +x libcdaudio-config])
echo
echo Ready to build libcdaudio $LIBCDAUDIO_VERSION_STRING.
echo
case $sys in
(irix)
echo "* I am configured for IRIX."
;;
(beos)
echo "* I am configured for BeOS."
;;
(solaris)
echo "* I am configured Solaris."
;;
(*)
echo "* I am configured for a generic or GNU or GNU-like system."
;;
esac
if test "$cross_compiling" = yes
then
echo "* The build is a cross-compilation."
else
echo "* The build is not a cross-compilation."
fi
if test $threads != no
then
echo "* I will build a thread-safe version."
else
echo "* I will build a non-thread-safe version."
fi
if test $xbox = 1
then
echo "* I will use the XBox fix."
else
echo "* I will not use the XBox fix."
echo " If you're compiling on XBox, consider enabling the fix"
echo " with --enable-xbox-fix."
fi
echo
echo "=> If you want to help, please contact the maintainer."
echo " libcdaudio cannot evolve as long as there is no portability testing."
echo " We need people who can compile & test libcdaudio on:"
echo " OpenBSD FreeBSD NetBSD Solaris Irix BeOS OSF/1 XBox/MythTV"
echo " If you use a box with one of these operating systems, please consider"
echo " helping us."
echo " Thanks."
echo
echo 'You may build libcdaudio with your favorite Make program, e.g. "make".'
|