Bring libvorbis's configure.in into the 21st century.
[platform/upstream/libvorbis.git] / configure.ac
index cf722fb..9822c77 100644 (file)
@@ -5,14 +5,14 @@ dnl Initialization and Versioning
 dnl ------------------------------------------------
 
 
-AC_INIT([libvorbis],[1.2.2],[vorbis-dev@xiph.org])
+AC_INIT([libvorbis],[1.3.3],[vorbis-dev@xiph.org])
 
 AC_CONFIG_SRCDIR([lib/mdct.c])
 
 AC_CANONICAL_TARGET([])
 
-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")
@@ -24,14 +24,17 @@ dnl - interfaces added -> increment AGE
 dnl - interfaces removed -> AGE = 0
 
 V_LIB_CURRENT=4
-V_LIB_REVISION=1
+V_LIB_REVISION=6
 V_LIB_AGE=4
+
 VF_LIB_CURRENT=6
-VF_LIB_REVISION=0
+VF_LIB_REVISION=5
 VF_LIB_AGE=3
+
 VE_LIB_CURRENT=2
-VE_LIB_REVISION=4
+VE_LIB_REVISION=9
 VE_LIB_AGE=0
+
 AC_SUBST(V_LIB_CURRENT)
 AC_SUBST(V_LIB_REVISION)
 AC_SUBST(V_LIB_AGE)
@@ -59,21 +62,36 @@ 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,
        AC_HELP_STRING([--enable-docs], [build the documentation]))
 
-dnl ideally we'd look for other tools and support them
-if test x$enable_docs = xyes; 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
+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$enable_docs = xyes])
+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
@@ -141,7 +159,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 *])
@@ -153,6 +171,10 @@ 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"
@@ -249,7 +271,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
@@ -258,7 +280,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
@@ -271,3 +294,6 @@ vorbis-uninstalled.pc
 vorbisenc-uninstalled.pc
 vorbisfile-uninstalled.pc
 ])
+AC_CONFIG_HEADERS([config.h])
+
+AC_OUTPUT