last batch of changes and fixes based on the libFLAC++ unit tests
[flac.git] / configure.in
index b7f643c..1f260da 100644 (file)
@@ -1,5 +1,5 @@
 #  FLAC - Free Lossless Audio Codec
-#  Copyright (C) 2001  Josh Coalson
+#  Copyright (C) 2001,2002  Josh Coalson
 #
 #  This program is part of FLAC; you can redistribute it and/or
 #  modify it under the terms of the GNU General Public License
@@ -19,7 +19,7 @@
 # instead of FLAC__ since autoconf triggers off 'AC_' in strings
 
 AC_INIT(src/flac/main.c)
-AM_INIT_AUTOMAKE(flac, 1.0.2)
+AM_INIT_AUTOMAKE(flac, 1.0.3_beta)
 
 # We need two libtools, one that builds both shared and static, and
 # one that builds only static.  This is because the resulting libtool
@@ -28,10 +28,15 @@ AM_PROG_LIBTOOL
 sed -e 's/^build_old_libs=yes/build_old_libs=no/' libtool > libtool-disable-static
 chmod +x libtool-disable-static
 
+AC_PROG_CXX
 AC_PROG_MAKE_SET
 
+dnl check for getopt in standard library
+dnl AC_CHECK_FUNCS(getopt_long , , [LIBOBJS="$LIBOBJS getopt.o getopt1.o"] )
+AC_CHECK_FUNCS(getopt_long, [], [])
+
 AC_CANONICAL_HOST
-case $host_cpu in
+case "$host_cpu" in
        i*86)   cpu_ia32=true ; AC_DEFINE(FLAC__CPU_IA32) ;;
        powerpc)        cpu_ppc=true ; AC_DEFINE(FLAC__CPU_PPC) ;;
        sparc)  cpu_sparc=true ; AC_DEFINE(FLAC__CPU_SPARC) ;;
@@ -99,6 +104,8 @@ fi
 AM_PATH_XMMS(0.9.5.1, , AC_MSG_WARN([*** XMMS >= 0.9.5.1 not installed - xmms support will not be built]))
 AM_CONDITIONAL(FLaC__HAS_XMMS, test x$XMMS_INPUT_PLUGIN_DIR != x)
 
+SHARE_LIBS='$(top_builddir)/src/share/libutf8.a $(top_builddir)/src/share/libgetopt.a'
+
 AC_CHECK_PROGS(NASM, nasm)
 AM_CONDITIONAL(FLaC__HAS_NASM, test -n "$NASM")
 if test -n "$NASM" ; then
@@ -155,17 +162,19 @@ AC_SUBST(FLaC__USIZE32)
 AC_SUBST(FLaC__SIZE64)
 AC_SUBST(FLaC__USIZE64)
 
-SAVE_CFLAGS="$CFLAGS"
-CFLAGS='-I$(top_builddir) -I$(srcdir)/include -I $(top_srcdir)/include -I$(top_builddir)/include/FLAC'
+AC_SUBST(SHARE_LIBS)
+
+OUR_CFLAGS_HEAD='-I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include'
 if test x$debug = xtrue; then
-       CFLAGS="$CFLAGS -g -O0 -DDEBUG"
+       OUR_CFLAGS_TAIL="-g -O0 -DDEBUG"
 else
-       CFLAGS="$CFLAGS -O3 -DNDEBUG"
+       OUR_CFLAGS_TAIL="-O3 -DNDEBUG"
        if test x$GCC = xyes; then
-               CFLAGS="$CFLAGS -fomit-frame-pointer -funroll-loops -finline-functions -Wall -W -Winline -DFLaC__INLINE=__inline__"
+               OUR_CFLAGS_TAIL="$OUR_CFLAGS_TAIL -fomit-frame-pointer -funroll-loops -finline-functions -Wall -W -Winline -DFLaC__INLINE=__inline__"
        fi
 fi
-CFLAGS="$CFLAGS $SAVE_CFLAGS"
+CFLAGS="$OUR_CFLAGS_HEAD $CFLAGS $OUR_CFLAGS_TAIL"
+CXXFLAGS="$OUR_CFLAGS_HEAD $CXXFLAGS $OUR_CFLAGS_TAIL"
 
 AC_OUTPUT(     Makefile        \
        src/Makefile    \
@@ -174,14 +183,19 @@ AC_OUTPUT(        Makefile        \
        src/libFLAC/include/Makefile    \
        src/libFLAC/include/private/Makefile    \
        src/libFLAC/include/protected/Makefile  \
+       src/libFLAC++/Makefile  \
        src/flac/Makefile       \
        src/metaflac/Makefile   \
        src/plugin_xmms/Makefile        \
+       src/share/Makefile      \
+       src/test_libFLAC/Makefile       \
+       src/test_libFLAC++/Makefile     \
        src/test_streams/Makefile       \
-       src/test_unit/Makefile  \
        include/Makefile \
        include/FLAC/Makefile \
        include/FLAC/ordinals.h \
+       include/FLAC++/Makefile \
+       include/share/Makefile \
        doc/Makefile \
        doc/images/Makefile \
        doc/ru/Makefile \