dnl Process this file with autoconf to produce a configure script dnl ------------------------------------------------ dnl Initialization dnl ------------------------------------------------ AC_INIT(oggenc/encode.c) AM_INIT_AUTOMAKE(vorbis-tools,1.0prebeta4) 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 CFLAGS="$cflags_save" AM_PROG_LIBTOOL dnl -------------------------------------------------- dnl Additional arguments dnl -------------------------------------------------- AC_ARG_WITH(ogg, [ --with-ogg=DIR Set where the Ogg library is located]) AC_ARG_WITH(vorbis, [ --with-vorbis=DIR Set where the Vorbis library is located]) dnl -------------------------------------------------- dnl Set build flags based on environment dnl -------------------------------------------------- AC_CANONICAL_HOST case $host in *-*-darwin*) DEBUG="-DDARWIN -Wall -g -O0 -fsigned-char" CFLAGS="-DDARWIN -Wall -g -O4 -ffast-math -fsigned-char" PROFILE="-DDARWIN -Wall -g -pg -O4 -ffast-math -fsigned-char";; esac dnl -------------------------------------------------- dnl Check for headers dnl -------------------------------------------------- dnl none dnl -------------------------------------------------- dnl Check for typedefs, structures, etc dnl -------------------------------------------------- dnl none dnl -------------------------------------------------- dnl Check for libraries dnl -------------------------------------------------- AM_PATH_OGG(,AC_MSG_ERROR(Ogg needed!)) AM_PATH_VORBIS(,AC_MSG_ERROR(Vorbis needed!)) AM_PATH_AO(,AC_MSG_ERROR(libao needed!)) dnl -------------------------------------------------- dnl Check for library functions dnl -------------------------------------------------- dnl none dnl -------------------------------------------------- dnl Do substitutions dnl -------------------------------------------------- AC_SUBST(DEBUG) AC_SUBST(PROFILE) AC_OUTPUT(Makefile oggenc/Makefile oggenc/man/Makefile ogg123/Makefile vorbiscomment/Makefile debian/Makefile)