dnl Process this file with autoconf to produce a configure script dnl ------------------------------------------------ dnl Initialization and Versioning dnl ------------------------------------------------ AC_INIT(lib/dct.c) AM_INIT_AUTOMAKE(libtheora,0.0) dnl Library versioning V_LIB_CURRENT=0 V_LIB_REVISION=0 V_LIB_AGE=0 AC_SUBST(V_LIB_CURRENT) AC_SUBST(V_LIB_REVISION) AC_SUBST(V_LIB_AGE) dnl -------------------------------------------------- dnl Check for programs dnl -------------------------------------------------- dnl save $CFLAGS since AC_PROG_CC likes to insert "-g -O2" dnl if $CFLAGS is blank cflags_save="$CFLAGS" AC_PROG_CC AC_PROG_CPP CFLAGS="$cflags_save" dnl no shared linking for us AM_DISABLE_SHARED AM_ENABLE_STATIC AM_PROG_LIBTOOL dnl -------------------------------------------------- dnl Set build flags based on environment dnl -------------------------------------------------- AC_CANONICAL_HOST dnl Set some target options cflags_save="$CFLAGS" ldflags_save="$LDFLAGS" if test -z "$GCC"; then case $host in *) DEBUG="-g" CFLAGS="-O" PROFILE="-g -p" ;; esac else case $host in *) DEBUG="-g -W -D__NO_MATH_INLINES" CFLAGS="-O2" PROFILE="-W -pg -g -O2 -fno-inline-functions";; esac fi CFLAGS="$CFLAGS $cflags_save -D_REENTRANT" LDFLAGS="$LDFLAGS $ldflags_save" dnl -------------------------------------------------- dnl Check for headers dnl -------------------------------------------------- dnl none dnl -------------------------------------------------- dnl Check for typedefs, structures, etc dnl -------------------------------------------------- dnl none dnl -------------------------------------------------- dnl Check for library functions dnl -------------------------------------------------- AM_PATH_SDL(,[ HAVE_SDL=yes SDL_LIBS=`$SDL_CONFIG --static-libs` ],AC_MSG_WARN([*** Unable to find SDL -- Not compiling player_example ***])) AM_CONDITIONAL(HAVE_SDL, test "$HAVE_SDL" = "yes") dnl -------------------------------------------------- dnl Do substitutions dnl -------------------------------------------------- LIBS="$LIBS" AC_SUBST(LIBS) AC_SUBST(DEBUG) AC_SUBST(PROFILE) AC_OUTPUT(Makefile lib/Makefile include/Makefile include/theora/Makefile \ examples/Makefile debian/Makefile)