1 dnl Process this file with autoconf to produce a configure script
3 dnl ------------------------------------------------
4 dnl Initialization and Versioning
5 dnl ------------------------------------------------
7 AC_INIT(theora-tools,[unreleased-snapshot])
8 AC_CONFIG_HEADERS([config.h])
11 dnl --------------------------------------------------
12 dnl Check for programs
13 dnl --------------------------------------------------
15 dnl save $CFLAGS since AC_PROG_CC likes to insert "-g -O2"
16 dnl if $CFLAGS is blank
22 dnl no shared linking for us
27 dnl --------------------------------------------------
28 dnl Set build flags based on environment
29 dnl --------------------------------------------------
33 dnl Set some target options
36 ldflags_save="$LDFLAGS"
37 if test -z "$GCC"; then
48 DEBUG="-g -W -D__NO_MATH_INLINES"
50 PROFILE="-W -pg -g -O2 -fno-inline-functions";;
53 CFLAGS="$CFLAGS $cflags_save"
54 LDFLAGS="$LDFLAGS $ldflags_save"
56 dnl --------------------------------------------------
58 dnl --------------------------------------------------
62 dnl --------------------------------------------------
63 dnl Check for typedefs, structures, etc
64 dnl --------------------------------------------------
68 dnl --------------------------------------------------
69 dnl Check for library functions
70 dnl --------------------------------------------------
72 dnl substitute the included getopt if the system doesn't support long options
73 AC_CHECK_FUNC(getopt_long,
75 [GETOPT_OBJS='getopt.$(OBJEXT) getopt1.$(OBJEXT)'])
78 AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes)
79 PKG_CHECK_MODULES(XIPH,ogg >= 1.1 vorbis theora)
80 CFLAGS="$CFLGS $XIPH_CFLAGS"
81 LIBS="$LIBS $XIPH_LIBS"
83 PKG_CHECK_MODULES(VORBISENC, vorbisenc)
84 AC_SUBST(VORBISENC_CFLAGS)
85 AC_SUBST(VORBISENC_LIBS)
89 if test "x$HAVE_PKG_CONFIG" = "xyes"
91 PKG_CHECK_MODULES(PNG, libpng, HAVE_PNG=yes, HAVE_PNG=no)
96 if test x$HAVE_PNG = xyes; then
97 PNG2THEORA="png2theora"
101 dnl --------------------------------------------------
103 dnl --------------------------------------------------
114 theoracomment/Makefile