if relay is for an mp3 stream, then get inline metadata by default if
[xiph/unicode.git] / theora / configure.in
blobfa0219b7affb9573edd06c259fa1ff8fd81c4005
1 dnl Process this file with autoconf to produce a configure script
3 dnl ------------------------------------------------
4 dnl Initialization and Versioning
5 dnl ------------------------------------------------
7 AC_INIT(lib/dct.c)
8 AM_INIT_AUTOMAKE(libtheora,0.0)
10 dnl Library versioning
12 V_LIB_CURRENT=0
13 V_LIB_REVISION=0
14 V_LIB_AGE=0
15 AC_SUBST(V_LIB_CURRENT)
16 AC_SUBST(V_LIB_REVISION)
17 AC_SUBST(V_LIB_AGE)
19 dnl --------------------------------------------------  
20 dnl Check for programs
21 dnl --------------------------------------------------  
23 dnl save $CFLAGS since AC_PROG_CC likes to insert "-g -O2"
24 dnl if $CFLAGS is blank
25 cflags_save="$CFLAGS"
26 AC_PROG_CC
27 AC_PROG_CPP
28 CFLAGS="$cflags_save"
30 dnl no shared linking for us
31 AM_DISABLE_SHARED
32 AM_ENABLE_STATIC
33 AM_PROG_LIBTOOL
35 dnl --------------------------------------------------
36 dnl Set build flags based on environment
37 dnl --------------------------------------------------
39 AC_CANONICAL_HOST
41 dnl Set some target options
43 cflags_save="$CFLAGS"
44 ldflags_save="$LDFLAGS"
45 if test -z "$GCC"; then
46         case $host in 
47         *)
48                 DEBUG="-g"
49                 CFLAGS="-O"
50                 PROFILE="-g -p" ;;
51         esac
52 else
54         case $host in 
55         *)
56                 DEBUG="-g -W -D__NO_MATH_INLINES"
57                 CFLAGS="-O2 -Wall"
58                 PROFILE="-W -pg -g -O2 -fno-inline-functions";;
59         esac
61 CFLAGS="$CFLAGS $cflags_save -D_REENTRANT"
62 LDFLAGS="$LDFLAGS $ldflags_save"
64 dnl --------------------------------------------------
65 dnl Check for headers
66 dnl --------------------------------------------------
68 dnl none here
70 dnl --------------------------------------------------
71 dnl Check for typedefs, structures, etc
72 dnl --------------------------------------------------
74 dnl none
76 dnl --------------------------------------------------
77 dnl Check for library functions
78 dnl --------------------------------------------------
80 dnl substitue the included getopt if the system doesn't support long options
81 AC_CHECK_FUNC(getopt_long, [GETOPT_OBJS=''], [GETOPT_OBJS='getopt.$(OBJEXT) getopt1.$(OBJEXT)'])
82 AC_SUBST(GETOPT_OBJS)
84 XIPH_PATH_OGG(, AC_MSG_ERROR([
85     libogg is required to build this package!
86     please see http://www.xiph.org/ for how to
87     obtain a copy.
88 ]))
89 CFLAGS="$CFLAGS $OGG_CFLAGS"
90 LIBS="$LIBS $OGG_LIBS"
91 AC_CHECK_FUNC(oggpackB_read, , [
92   AC_MSG_ERROR([newer libogg version (>1.0) required])
95 AM_PATH_SDL(,[
96         HAVE_SDL=yes
97         SDL_LIBS=`$SDL_CONFIG --static-libs`
98 ],AC_MSG_WARN([*** Unable to find SDL -- Not compiling example players ***]))
100 AC_CHECK_HEADERS([sys/soundcard.h soundcard.h machine/soundcard.h],[
101   HAVE_OSS=yes
102   break
105 AC_CHECK_LIB(portaudio, Pa_OpenStream, [
106   AC_CHECK_HEADER(portaudio.h, [HAVE_PORTAUDIO=yes])
107   ],,[-lpthread]
109 if test "$HAVE_PORTAUDIO" = "no"; then
110   AC_MSG_WARN([portaudio not found -- not compiling splayer example])
113 if test x$HAVE_SDL = xyes -a x$HAVE_OSS = xyes; then
114   BUILDABLE_EXAMPLES="$BUILDABLE_EXAMPLES player_example"
116 if test x$HAVE_SDL = xyes -a x$HAVE_PORTAUDIO = xyes; then
117   BUILDABLE_EXAMPLES="$BUILDABLE_EXAMPLES splayer"
119 AC_SUBST(BUILDABLE_EXAMPLES)
121 dnl --------------------------------------------------
122 dnl Do substitutions
123 dnl --------------------------------------------------
125 LIBS="$LIBS"
127 AC_SUBST(LIBS)
128 AC_SUBST(DEBUG)
129 AC_SUBST(PROFILE)
131 AC_OUTPUT(Makefile lib/Makefile include/Makefile include/theora/Makefile \
132         doc/Makefile examples/Makefile debian/Makefile)