2000-09-03 05:54:26 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
2001-08-13 02:40:36 +00:00
|
|
|
|
2000-09-03 05:54:26 +00:00
|
|
|
AC_INIT(src/framing.c)
|
|
|
|
|
2010-06-04 06:41:11 +00:00
|
|
|
AM_INIT_AUTOMAKE(libogg,1.2.1pre)
|
2003-10-18 20:36:46 +00:00
|
|
|
AM_MAINTAINER_MODE
|
2000-09-03 05:54:26 +00:00
|
|
|
|
2000-09-26 18:28:27 +00:00
|
|
|
dnl Library versioning
|
|
|
|
|
2010-03-21 23:26:28 +00:00
|
|
|
LIB_CURRENT=7
|
2010-06-04 06:41:11 +00:00
|
|
|
LIB_REVISION=1
|
2010-03-21 23:26:28 +00:00
|
|
|
LIB_AGE=7
|
2000-09-26 18:28:27 +00:00
|
|
|
AC_SUBST(LIB_CURRENT)
|
|
|
|
AC_SUBST(LIB_REVISION)
|
|
|
|
AC_SUBST(LIB_AGE)
|
|
|
|
|
2000-09-03 05:54:26 +00:00
|
|
|
AC_PROG_CC
|
|
|
|
AM_PROG_LIBTOOL
|
2008-10-18 10:00:29 +00:00
|
|
|
AM_PROG_CC_C_O
|
2000-09-03 05:54:26 +00:00
|
|
|
|
2004-07-05 11:39:23 +00:00
|
|
|
dnl config.h
|
|
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
|
2000-09-03 05:54:26 +00:00
|
|
|
dnl Set some options based on environment
|
|
|
|
|
2001-02-28 03:17:17 +00:00
|
|
|
cflags_save="$CFLAGS"
|
2000-09-03 05:54:26 +00:00
|
|
|
if test -z "$GCC"; then
|
|
|
|
case $host in
|
|
|
|
*-*-irix*)
|
|
|
|
DEBUG="-g -signed"
|
|
|
|
CFLAGS="-O2 -w -signed"
|
|
|
|
PROFILE="-p -g3 -O2 -signed"
|
|
|
|
;;
|
|
|
|
sparc-sun-solaris*)
|
|
|
|
DEBUG="-v -g"
|
|
|
|
CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
|
|
|
|
PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
DEBUG="-g"
|
|
|
|
CFLAGS="-O"
|
|
|
|
PROFILE="-g -p"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|
|
|
|
case $host in
|
|
|
|
*-*-linux*)
|
|
|
|
DEBUG="-g -Wall -fsigned-char"
|
2010-03-26 03:38:31 +00:00
|
|
|
CFLAGS="-O20 -Wall -ffast-math -fsigned-char"
|
2000-09-03 05:54:26 +00:00
|
|
|
PROFILE="-Wall -W -pg -g -O20 -ffast-math -fsigned-char"
|
|
|
|
;;
|
|
|
|
sparc-sun-*)
|
2009-05-27 13:10:39 +00:00
|
|
|
sparc_cpu=""
|
|
|
|
AC_MSG_CHECKING([if gcc supports -mv8])
|
|
|
|
old_cflags="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS -mv8"
|
|
|
|
AC_TRY_COMPILE(, [return 0;], [
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
sparc_cpu="-mv8"
|
|
|
|
])
|
|
|
|
CFLAGS="$old_cflags"
|
|
|
|
DEBUG="-g -Wall -fsigned-char $sparc_cpu"
|
|
|
|
CFLAGS="-O20 -ffast-math -fsigned-char $sparc_cpu"
|
|
|
|
PROFILE="-pg -g -O20 -fsigned-char $sparc_cpu"
|
2000-09-03 05:54:26 +00:00
|
|
|
;;
|
2001-01-30 00:18:35 +00:00
|
|
|
*-*-darwin*)
|
|
|
|
DEBUG="-fno-common -g -Wall -fsigned-char"
|
|
|
|
CFLAGS="-fno-common -O4 -Wall -fsigned-char -ffast-math"
|
|
|
|
PROFILE="-fno-common -O4 -Wall -pg -g -fsigned-char -ffast-math"
|
|
|
|
;;
|
2000-09-03 05:54:26 +00:00
|
|
|
*)
|
|
|
|
DEBUG="-g -Wall -fsigned-char"
|
|
|
|
CFLAGS="-O20 -fsigned-char"
|
|
|
|
PROFILE="-O20 -g -pg -fsigned-char"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
2001-02-28 03:17:17 +00:00
|
|
|
CFLAGS="$CFLAGS $cflags_save"
|
2001-10-27 22:43:54 +00:00
|
|
|
DEBUG="$DEBUG $cflags_save"
|
|
|
|
PROFILE="$PROFILE $cflags_save"
|
2000-09-03 05:54:26 +00:00
|
|
|
|
|
|
|
dnl Checks for programs.
|
|
|
|
|
|
|
|
dnl Checks for libraries.
|
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
|
|
|
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_C_CONST
|
|
|
|
|
|
|
|
dnl Check for types
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for int16_t)
|
2009-05-19 23:27:38 +00:00
|
|
|
AC_CACHE_VAL(has_cv_int16_t,
|
2000-09-03 05:54:26 +00:00
|
|
|
[AC_TRY_RUN([
|
2008-06-04 03:27:18 +00:00
|
|
|
#if defined __BEOS__ && !defined __HAIKU__
|
2000-09-03 05:54:26 +00:00
|
|
|
#include <inttypes.h>
|
|
|
|
#endif
|
|
|
|
#include <sys/types.h>
|
|
|
|
int16_t foo;
|
|
|
|
int main() {return 0;}
|
|
|
|
],
|
2009-05-19 23:27:38 +00:00
|
|
|
has_cv_int16_t=yes,
|
|
|
|
has_cv_int16_t=no,
|
|
|
|
has_cv_int16_t=no
|
2000-09-03 05:54:26 +00:00
|
|
|
)])
|
2009-05-19 23:27:38 +00:00
|
|
|
AC_MSG_RESULT($has_cv_int16_t)
|
2000-09-03 05:54:26 +00:00
|
|
|
|
|
|
|
AC_MSG_CHECKING(for int32_t)
|
2009-05-19 23:27:38 +00:00
|
|
|
AC_CACHE_VAL(has_cv_int32_t,
|
2000-09-03 05:54:26 +00:00
|
|
|
[AC_TRY_RUN([
|
2008-06-04 03:27:18 +00:00
|
|
|
#if defined __BEOS__ && !defined __HAIKU__
|
2000-09-03 05:54:26 +00:00
|
|
|
#include <inttypes.h>
|
|
|
|
#endif
|
|
|
|
#include <sys/types.h>
|
|
|
|
int32_t foo;
|
|
|
|
int main() {return 0;}
|
|
|
|
],
|
2009-05-19 23:27:38 +00:00
|
|
|
has_cv_int32_t=yes,
|
|
|
|
has_cv_int32_t=no,
|
|
|
|
has_cv_int32_t=no
|
2000-09-03 05:54:26 +00:00
|
|
|
)])
|
2009-05-19 23:27:38 +00:00
|
|
|
AC_MSG_RESULT($has_cv_int32_t)
|
2000-09-03 05:54:26 +00:00
|
|
|
|
|
|
|
AC_MSG_CHECKING(for uint32_t)
|
2009-05-19 23:27:38 +00:00
|
|
|
AC_CACHE_VAL(has_cv_uint32_t,
|
2000-09-03 05:54:26 +00:00
|
|
|
[AC_TRY_RUN([
|
2008-06-04 03:27:18 +00:00
|
|
|
#if defined __BEOS__ && !defined __HAIKU__
|
2000-09-03 05:54:26 +00:00
|
|
|
#include <inttypes.h>
|
|
|
|
#endif
|
|
|
|
#include <sys/types.h>
|
|
|
|
uint32_t foo;
|
|
|
|
int main() {return 0;}
|
|
|
|
],
|
2009-05-19 23:27:38 +00:00
|
|
|
has_cv_uint32_t=yes,
|
|
|
|
has_cv_uint32_t=no,
|
|
|
|
has_cv_uint32_t=no
|
2000-09-03 05:54:26 +00:00
|
|
|
)])
|
2009-05-19 23:27:38 +00:00
|
|
|
AC_MSG_RESULT($has_cv_uint32_t)
|
2000-09-03 05:54:26 +00:00
|
|
|
|
2002-09-18 04:42:09 +00:00
|
|
|
AC_MSG_CHECKING(for uint16_t)
|
2009-05-19 23:27:38 +00:00
|
|
|
AC_CACHE_VAL(has_cv_uint16_t,
|
2002-09-18 04:42:09 +00:00
|
|
|
[AC_TRY_RUN([
|
2008-06-04 03:27:18 +00:00
|
|
|
#if defined __BEOS__ && !defined __HAIKU__
|
2002-09-18 04:42:09 +00:00
|
|
|
#include <inttypes.h>
|
|
|
|
#endif
|
|
|
|
#include <sys/types.h>
|
|
|
|
uint16_t foo;
|
|
|
|
int main() {return 0;}
|
|
|
|
],
|
2009-05-19 23:27:38 +00:00
|
|
|
has_cv_uint16_t=yes,
|
|
|
|
has_cv_uint16_t=no,
|
|
|
|
has_cv_uint16_t=no
|
2002-09-18 04:42:09 +00:00
|
|
|
)])
|
2009-05-19 23:27:38 +00:00
|
|
|
AC_MSG_RESULT($has_cv_uint16_t)
|
2002-09-18 04:42:09 +00:00
|
|
|
|
2000-09-03 05:54:26 +00:00
|
|
|
AC_MSG_CHECKING(for u_int32_t)
|
2009-05-19 23:27:38 +00:00
|
|
|
AC_CACHE_VAL(has_cv_u_int32_t,
|
2000-09-03 05:54:26 +00:00
|
|
|
[AC_TRY_RUN([
|
2008-06-04 03:27:18 +00:00
|
|
|
#if defined __BEOS__ && !defined __HAIKU__
|
2000-09-03 05:54:26 +00:00
|
|
|
#include <inttypes.h>
|
|
|
|
#endif
|
|
|
|
#include <sys/types.h>
|
|
|
|
u_int32_t foo;
|
|
|
|
int main() {return 0;}
|
|
|
|
],
|
2009-05-19 23:27:38 +00:00
|
|
|
has_cv_u_int32_t=yes,
|
|
|
|
has_cv_u_int32_t=no,
|
|
|
|
has_cv_u_int32_t=no
|
2000-09-03 05:54:26 +00:00
|
|
|
)])
|
2009-05-19 23:27:38 +00:00
|
|
|
AC_MSG_RESULT($has_cv_u_int32_t)
|
2000-09-03 05:54:26 +00:00
|
|
|
|
2002-09-18 04:42:09 +00:00
|
|
|
AC_MSG_CHECKING(for u_int16_t)
|
2009-05-19 23:27:38 +00:00
|
|
|
AC_CACHE_VAL(has_cv_u_int16_t,
|
2002-09-18 04:42:09 +00:00
|
|
|
[AC_TRY_RUN([
|
2008-06-04 03:27:18 +00:00
|
|
|
#if defined __BEOS__ && !defined __HAIKU__
|
2002-09-18 04:42:09 +00:00
|
|
|
#include <inttypes.h>
|
|
|
|
#endif
|
|
|
|
#include <sys/types.h>
|
|
|
|
u_int16_t foo;
|
|
|
|
int main() {return 0;}
|
|
|
|
],
|
2009-05-19 23:27:38 +00:00
|
|
|
has_cv_u_int16_t=yes,
|
|
|
|
has_cv_u_int16_t=no,
|
|
|
|
has_cv_u_int16_t=no
|
2002-09-18 04:42:09 +00:00
|
|
|
)])
|
2009-05-19 23:27:38 +00:00
|
|
|
AC_MSG_RESULT($has_cv_u_int16_t)
|
2002-09-18 04:42:09 +00:00
|
|
|
|
2000-09-03 05:54:26 +00:00
|
|
|
AC_MSG_CHECKING(for int64_t)
|
2009-05-19 23:27:38 +00:00
|
|
|
AC_CACHE_VAL(has_cv_int64_t,
|
2000-09-03 05:54:26 +00:00
|
|
|
[AC_TRY_RUN([
|
2008-06-04 03:27:18 +00:00
|
|
|
#if defined __BEOS__ && !defined __HAIKU__
|
2000-09-03 05:54:26 +00:00
|
|
|
#include <inttypes.h>
|
|
|
|
#endif
|
|
|
|
#include <sys/types.h>
|
|
|
|
int64_t foo;
|
|
|
|
int main() {return 0;}
|
|
|
|
],
|
2009-05-19 23:27:38 +00:00
|
|
|
has_cv_int64_t=yes,
|
|
|
|
has_cv_int64_t=no,
|
|
|
|
has_cv_int64_t=no
|
2000-09-03 05:54:26 +00:00
|
|
|
)])
|
2009-05-19 23:27:38 +00:00
|
|
|
AC_MSG_RESULT($has_cv_int64_t)
|
2000-09-03 05:54:26 +00:00
|
|
|
|
2007-06-02 03:38:34 +00:00
|
|
|
AC_CHECK_SIZEOF(short,2)
|
|
|
|
AC_CHECK_SIZEOF(int,4)
|
|
|
|
AC_CHECK_SIZEOF(long,4)
|
|
|
|
AC_CHECK_SIZEOF(long long,8)
|
2000-09-03 05:54:26 +00:00
|
|
|
|
|
|
|
|
2009-05-19 23:27:38 +00:00
|
|
|
if test x$has_cv_int16_t = "xyes" ; then
|
2000-09-03 05:54:26 +00:00
|
|
|
SIZE16="int16_t"
|
|
|
|
else
|
|
|
|
case 2 in
|
|
|
|
$ac_cv_sizeof_short) SIZE16="short";;
|
|
|
|
$ac_cv_sizeof_int) SIZE16="int";;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2009-05-19 23:27:38 +00:00
|
|
|
if test x$has_cv_int32_t = "xyes" ; then
|
2000-09-03 05:54:26 +00:00
|
|
|
SIZE32="int32_t"
|
|
|
|
else
|
|
|
|
case 4 in
|
|
|
|
$ac_cv_sizeof_short) SIZE32="short";;
|
|
|
|
$ac_cv_sizeof_int) SIZE32="int";;
|
|
|
|
$ac_cv_sizeof_long) SIZE32="long";;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2009-05-19 23:27:38 +00:00
|
|
|
if test x$has_cv_uint32_t = "xyes" ; then
|
2000-09-03 05:54:26 +00:00
|
|
|
USIZE32="uint32_t"
|
|
|
|
else
|
2009-05-19 23:27:38 +00:00
|
|
|
if test x$has_cv_u_int32_t = "xyes" ; then
|
2000-09-03 05:54:26 +00:00
|
|
|
USIZE32="u_int32_t"
|
|
|
|
else
|
|
|
|
case 4 in
|
|
|
|
$ac_cv_sizeof_short) USIZE32="unsigned short";;
|
|
|
|
$ac_cv_sizeof_int) USIZE32="unsigned int";;
|
|
|
|
$ac_cv_sizeof_long) USIZE32="unsigned long";;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2009-05-19 23:27:38 +00:00
|
|
|
if test x$has_cv_uint16_t = "xyes" ; then
|
2002-09-18 04:42:09 +00:00
|
|
|
USIZE16="uint16_t"
|
|
|
|
else
|
2009-05-19 23:27:38 +00:00
|
|
|
if test x$has_cv_u_int16_t = "xyes" ; then
|
2002-09-18 04:42:09 +00:00
|
|
|
USIZE16="u_int16_t"
|
|
|
|
else
|
|
|
|
case 2 in
|
|
|
|
$ac_cv_sizeof_short) USIZE16="unsigned short";;
|
|
|
|
$ac_cv_sizeof_int) USIZE16="unsigned int";;
|
|
|
|
$ac_cv_sizeof_long) USIZE16="unsigned long";;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2009-05-19 23:27:38 +00:00
|
|
|
if test x$has_cv_int64_t = "xyes" ; then
|
2000-09-03 05:54:26 +00:00
|
|
|
SIZE64="int64_t"
|
|
|
|
else
|
|
|
|
case 8 in
|
|
|
|
$ac_cv_sizeof_int) SIZE64="int";;
|
|
|
|
$ac_cv_sizeof_long) SIZE64="long";;
|
|
|
|
$ac_cv_sizeof_long_long) SIZE64="long long";;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -z "$SIZE16"; then
|
|
|
|
AC_MSG_ERROR(No 16 bit type found on this platform!)
|
|
|
|
fi
|
2002-09-18 04:42:09 +00:00
|
|
|
if test -z "$USIZE16"; then
|
|
|
|
AC_MSG_ERROR(No unsigned 16 bit type found on this platform!)
|
|
|
|
fi
|
2000-09-03 05:54:26 +00:00
|
|
|
if test -z "$SIZE32"; then
|
|
|
|
AC_MSG_ERROR(No 32 bit type found on this platform!)
|
|
|
|
fi
|
|
|
|
if test -z "$USIZE32"; then
|
|
|
|
AC_MSG_ERROR(No unsigned 32 bit type found on this platform!)
|
|
|
|
fi
|
|
|
|
if test -z "$SIZE64"; then
|
|
|
|
AC_MSG_WARN(No 64 bit type found on this platform!)
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Checks for library functions.
|
|
|
|
AC_FUNC_MEMCMP
|
|
|
|
|
|
|
|
dnl Make substitutions
|
|
|
|
|
|
|
|
AC_SUBST(LIBTOOL_DEPS)
|
|
|
|
AC_SUBST(SIZE16)
|
2002-09-18 04:42:09 +00:00
|
|
|
AC_SUBST(USIZE16)
|
2000-09-03 05:54:26 +00:00
|
|
|
AC_SUBST(SIZE32)
|
|
|
|
AC_SUBST(USIZE32)
|
|
|
|
AC_SUBST(SIZE64)
|
|
|
|
AC_SUBST(OPT)
|
|
|
|
AC_SUBST(LIBS)
|
|
|
|
AC_SUBST(DEBUG)
|
|
|
|
AC_SUBST(CFLAGS)
|
|
|
|
AC_SUBST(PROFILE)
|
|
|
|
|
2004-07-05 11:13:36 +00:00
|
|
|
AC_OUTPUT([
|
|
|
|
Makefile
|
|
|
|
src/Makefile
|
2005-08-02 21:25:10 +00:00
|
|
|
doc/Makefile doc/libogg/Makefile
|
2004-07-05 11:13:36 +00:00
|
|
|
include/Makefile include/ogg/Makefile include/ogg/config_types.h
|
2004-07-05 11:17:48 +00:00
|
|
|
libogg.spec
|
2004-07-05 11:13:36 +00:00
|
|
|
ogg.pc
|
|
|
|
ogg-uninstalled.pc
|
|
|
|
])
|