X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=configure.ac;h=4e93459317b0fd8aa2abda8d035138a3b4aa056a;hb=68cbf438e3214d1697b1c10f6818da7bd7e4a090;hp=474cefe2733231fcd22f2d03c5b8aefccf4d0a05;hpb=49491b1ea8d8c7a918ec0911f59798af981889e5;p=platform%2Fupstream%2Flibvorbis.git diff --git a/configure.ac b/configure.ac index 474cefe..4e93459 100644 --- a/configure.ac +++ b/configure.ac @@ -5,18 +5,23 @@ dnl Initialization and Versioning dnl ------------------------------------------------ -AC_INIT([libvorbis],[1.2.1svn],[vorbis-dev@xiph.org]) +AC_INIT([libvorbis],[1.3.6],[vorbis-dev@xiph.org]) + +AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([lib/mdct.c]) -AC_CANONICAL_TARGET([]) +AC_CANONICAL_HOST -AM_INIT_AUTOMAKE($PACKAGE_NAME,$PACKAGE_VERSION) -AM_CONFIG_HEADER([config.h]) +AM_INIT_AUTOMAKE +AM_MAINTAINER_MODE dnl Add parameters for aclocal AC_SUBST(ACLOCAL_AMFLAGS, "-I m4") +dnl enable silent rules on automake 1.11 and later +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + dnl Library versioning dnl - library source changed -> increment REVISION dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0 @@ -24,14 +29,17 @@ dnl - interfaces added -> increment AGE dnl - interfaces removed -> AGE = 0 V_LIB_CURRENT=4 -V_LIB_REVISION=1 +V_LIB_REVISION=8 V_LIB_AGE=4 + VF_LIB_CURRENT=6 -VF_LIB_REVISION=0 +VF_LIB_REVISION=7 VF_LIB_AGE=3 + VE_LIB_CURRENT=2 -VE_LIB_REVISION=4 +VE_LIB_REVISION=11 VE_LIB_AGE=0 + AC_SUBST(V_LIB_CURRENT) AC_SUBST(V_LIB_REVISION) AC_SUBST(V_LIB_AGE) @@ -42,9 +50,9 @@ AC_SUBST(VE_LIB_CURRENT) AC_SUBST(VE_LIB_REVISION) AC_SUBST(VE_LIB_AGE) -dnl -------------------------------------------------- +dnl -------------------------------------------------- dnl Check for programs -dnl -------------------------------------------------- +dnl -------------------------------------------------- dnl save $CFLAGS since AC_PROG_CC likes to insert "-g -O2" dnl if $CFLAGS is blank @@ -55,29 +63,40 @@ CFLAGS="$cflags_save" AC_C_INLINE -AM_PROG_LIBTOOL +AC_LIBTOOL_WIN32_DLL +AC_PROG_LIBTOOL AM_PROG_CC_C_O -dnl docbook xml transform and processing tools +dnl Check for doxygen +if test "x$enable_docs" = xyes; then + AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false) + if test $HAVE_DOXYGEN = "false"; then + AC_MSG_WARN([*** doxygen not found, API documentation will not be built]) + fi +else + HAVE_DOXYGEN=false +fi +AM_CONDITIONAL(HAVE_DOXYGEN,$HAVE_DOXYGEN) + +dnl latex tools for the specification document AC_ARG_ENABLE(docs, - [ --enable-docs build the documentation], - [case "${enableval}" in - yes) build_docs=true;; - no) build_docs=false;; - *) AC_MSG_ERROR(unknown value ${enableval} for --enable-docs);; - esac],[build_docs=false]) - -dnl ideally we'd look for other tools and support them -if test x$build_docs = xtrue; then - AC_CHECK_PROGS([XSLTPROC], xsltproc, [/bin/false]) - AC_CHECK_PROGS([PDFXMLTEX], pdfxmltex, [/bin/false]) - if test "x$XSLTPROC" = "x/bin/false" || test "x$PDFXMLTEX" = "x/bin/false"; then - build_docs=false + AC_HELP_STRING([--enable-docs], [build the documentation])) + +if test "x$enable_docs" = xyes; then + AC_CHECK_PROGS([PDFLATEX], pdflatex, [/bin/false]) + AC_CHECK_PROGS([HTLATEX], htlatex, [/bin/false]) + if test "x$PDFLATEX" = x/bin/false || test "x$HTLATEX" = x/bin/false; then + enable_docs=no AC_MSG_WARN([Documentation will not be built!]) fi fi -AM_CONDITIONAL(BUILD_DOCS, [test x$build_docs = xtrue]) +AM_CONDITIONAL(BUILD_DOCS, [test "x$enable_docs" = xyes]) + +AC_ARG_ENABLE(examples, + AS_HELP_STRING([--enable-examples], [build the examples])) + +AM_CONDITIONAL(BUILD_EXAMPLES, [test "x$enable_examples" = xyes]) dnl -------------------------------------------------- dnl Set build flags based on environment @@ -87,14 +106,14 @@ dnl Set some target options cflags_save="$CFLAGS" if test -z "$GCC"; then - case $host in + case $host in *-*-irix*) - dnl If we're on IRIX, we wanna use cc even if gcc + dnl If we're on IRIX, we wanna use cc even if gcc dnl is there (unless the user has overriden us)... if test -z "$CC"; then CC=cc fi - DEBUG="-g -signed" + DEBUG="-g -signed" CFLAGS="-O2 -w -signed" PROFILE="-p -g3 -O2 -signed" ;; sparc-sun-solaris*) @@ -111,12 +130,12 @@ else AC_MSG_CHECKING([GCC version]) GCC_VERSION=`$CC -dumpversion` AC_MSG_RESULT([$GCC_VERSION]) - case $host in + case $host in *86-*-linux*) DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char" - CFLAGS="-O20 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char" -# PROFILE="-Wall -Wextra -pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char -fno-inline -static" - PROFILE="-Wall -Wextra -pg -g -O20 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char -fno-inline" + CFLAGS="-O3 -Wall -Wextra -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char" +# PROFILE="-Wall -Wextra -pg -g -O3 -ffast-math -D_REENTRANT -fsigned-char -fno-inline -static" + PROFILE="-Wall -Wextra -pg -g -O3 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char -fno-inline" # glibc < 2.1.3 has a serious FP bug in the math inline header # that will cripple Vorbis. Look to see if the magic FP stack @@ -145,7 +164,7 @@ else AC_MSG_WARN([* machine. Upgrading to glibc 2.1.3 is strongly urged *]) AC_MSG_WARN([* to correct the problem. Note that upgrading glibc *]) AC_MSG_WARN([* will not fix any previously built programs; this is *]) - AC_MSG_WARN([* a compile-time time bug. *]) + AC_MSG_WARN([* a compile-time bug. *]) AC_MSG_WARN([* To work around the problem for this build of Ogg, *]) AC_MSG_WARN([* autoconf is disabling all math inlining. This will *]) AC_MSG_WARN([* hurt Ogg performace but is necessary for an Ogg that *]) @@ -157,31 +176,44 @@ else CFLAGS=${OPT}" -D__NO_MATH_INLINES" PROFILE=${PROFILE}" -D__NO_MATH_INLINES" fi;; + powerpc-*-linux*spe) + DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES" + CFLAGS="-O3 -Wall -Wextra -ffast-math -mfused-madd -D_REENTRANT" + PROFILE="-pg -g -O3 -ffast-math -mfused-madd -D_REENTRANT";; powerpc-*-linux*) DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES" CFLAGS="-O3 -Wall -Wextra -ffast-math -mfused-madd -mcpu=750 -D_REENTRANT" PROFILE="-pg -g -O3 -ffast-math -mfused-madd -mcpu=750 -D_REENTRANT";; *-*-linux*) DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char" - CFLAGS="-O20 -Wall -Wextra -ffast-math -D_REENTRANT -fsigned-char" - PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char";; + CFLAGS="-O3 -Wall -Wextra -ffast-math -D_REENTRANT -fsigned-char" + PROFILE="-pg -g -O3 -ffast-math -D_REENTRANT -fsigned-char";; sparc-sun-*) - DEBUG="-g -Wall -Wextra -D__NO_MATH_INLINES -fsigned-char -mv8" - CFLAGS="-O20 -Wall -Wextra -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8" - PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char -mv8" ;; + 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 -Wextra -D__NO_MATH_INLINES -fsigned-char $sparc_cpu" + CFLAGS="-O3 -Wall -Wextra -ffast-math -D__NO_MATH_INLINES -fsigned-char $sparc_cpu" + PROFILE="-pg -g -O3 -D__NO_MATH_INLINES -fsigned-char $sparc_cpu" ;; *-*-darwin*) DEBUG="-DDARWIN -fno-common -force_cpusubtype_ALL -Wall -g -O0 -fsigned-char" - CFLAGS="-DDARWIN -fno-common -force_cpusubtype_ALL -Wall -g -O4 -ffast-math -fsigned-char" - PROFILE="-DDARWIN -fno-common -force_cpusubtype_ALL -Wall -g -pg -O4 -ffast-math -fsigned-char";; + CFLAGS="-DDARWIN -fno-common -force_cpusubtype_ALL -Wall -g -O3 -ffast-math -fsigned-char" + PROFILE="-DDARWIN -fno-common -force_cpusubtype_ALL -Wall -g -pg -O3 -ffast-math -fsigned-char";; *-*-os2*) # Use -W instead of -Wextra because gcc on OS/2 is an old version. DEBUG="-g -Wall -W -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char" - CFLAGS="-O20 -Wall -W -ffast-math -D_REENTRANT -fsigned-char" - PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char";; + CFLAGS="-O3 -Wall -W -ffast-math -D_REENTRANT -fsigned-char" + PROFILE="-pg -g -O3 -ffast-math -D_REENTRANT -fsigned-char";; *) DEBUG="-g -Wall -Wextra -D__NO_MATH_INLINES -fsigned-char" - CFLAGS="-O20 -Wall -Wextra -D__NO_MATH_INLINES -fsigned-char" - PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char" ;; + CFLAGS="-O3 -Wall -Wextra -D__NO_MATH_INLINES -fsigned-char" + PROFILE="-O3 -g -pg -D__NO_MATH_INLINES -fsigned-char" ;; esac AC_ADD_CFLAGS([-Wdeclaration-after-statement]) @@ -207,8 +239,13 @@ dnl -------------------------------------------------- AC_CHECK_LIB(m, cos, VORBIS_LIBS="-lm", VORBIS_LIBS="") AC_CHECK_LIB(pthread, pthread_create, pthread_lib="-lpthread", :) +PKG_PROG_PKG_CONFIG + HAVE_OGG=no -PKG_CHECK_MODULES(OGG, ogg >= 1.0, HAVE_OGG=yes, HAVE_OGG=no) +if test "x$PKG_CONFIG" != "x" +then + PKG_CHECK_MODULES(OGG, ogg >= 1.0, HAVE_OGG=yes, HAVE_OGG=no) +fi if test "x$HAVE_OGG" = "xno" then dnl fall back to the old school test @@ -239,7 +276,7 @@ dnl The following line causes the libtool distributed with the source dnl to be replaced if the build system has a more recent version. AC_SUBST(LIBTOOL_DEPS) -AC_OUTPUT([ +AC_CONFIG_FILES([ Makefile m4/Makefile lib/Makefile @@ -248,7 +285,8 @@ lib/books/Makefile lib/books/coupled/Makefile lib/books/uncoupled/Makefile lib/books/floor/Makefile -doc/Makefile doc/vorbisfile/Makefile doc/vorbisenc/Makefile +doc/Makefile doc/vorbisfile/Makefile doc/vorbisenc/Makefile doc/libvorbis/Makefile +doc/Doxyfile include/Makefile include/vorbis/Makefile examples/Makefile test/Makefile @@ -261,3 +299,6 @@ vorbis-uninstalled.pc vorbisenc-uninstalled.pc vorbisfile-uninstalled.pc ]) +AC_CONFIG_HEADERS([config.h]) + +AC_OUTPUT