Update of /cvsroot/audacity/audacity-src
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv7404

Modified Files:
      Tag: AUDACITY_1_2
        configure configure.in 
Log Message:
Fix building of libflac.


Index: configure
===================================================================
RCS file: /cvsroot/audacity/audacity-src/configure,v
retrieving revision 1.62.2.16
retrieving revision 1.62.2.17
diff -u -d -r1.62.2.16 -r1.62.2.17
--- configure   26 Oct 2006 17:16:31 -0000      1.62.2.16
+++ configure   11 Nov 2006 23:24:58 -0000      1.62.2.17
@@ -311,6 +311,7 @@
 #endif"
 
 ac_subdirs_all="$ac_subdirs_all [lib-src/soundtouch]"
+ac_subdirs_all="$ac_subdirs_all [lib-src/libflac]"
 ac_subdirs_all="$ac_subdirs_all [lib-src/libsndfile]"
 ac_subdirs_all="$ac_subdirs_all [lib-src/libresample]"
 ac_subdirs_all="$ac_subdirs_all [lib-src/libsamplerate]"
@@ -730,13 +731,13 @@
          /^X\(\/\).*/{ s//\1/; q; }
          s/.*/./; q'`
   srcdir=$ac_confdir
-  if test ! -r "$srcdir/$ac_unique_file"; then
+  if test ! -r $srcdir/$ac_unique_file; then
     srcdir=..
   fi
 else
   ac_srcdir_defaulted=no
 fi
-if test ! -r "$srcdir/$ac_unique_file"; then
+if test ! -r $srcdir/$ac_unique_file; then
   if test "$ac_srcdir_defaulted" = yes; then
     { echo "$as_me: error: cannot find sources ($ac_unique_file) in 
$ac_confdir or .." >&2
    { (exit 1); exit 1; }; }
@@ -745,7 +746,7 @@
    { (exit 1); exit 1; }; }
   fi
 fi
-(cd $srcdir && test -r "./$ac_unique_file") 2>/dev/null ||
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not 
work" >&2
    { (exit 1); exit 1; }; }
 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
@@ -876,8 +877,9 @@
 Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-flac           enable FLAC support in local libsndfile [default=no]
-                          This has no effect if you use system libsndfile.
+  --enable-flac           enable FLAC support in local libsndfile
+                          [default=yes] This has no effect if you use system
+                          libsndfile.
   --disable-soundtouch-check   Do not look for the SoundTouch Library
 
 Optional Packages:
@@ -4020,10 +4022,29 @@
 fi
 
 
+echo "$as_me:$LINENO: checking for lib-src/libflac/include/FLAC/all.h" >&5
+echo $ECHO_N "checking for lib-src/libflac/include/FLAC/all.h... $ECHO_C" >&6
+if test "${ac_cv_file_lib_src_libflac_include_FLAC_all_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross 
compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" 
>&2;}
+   { (exit 1); exit 1; }; }
+if test -r "lib-src/libflac/include/FLAC/all.h"; then
+  ac_cv_file_lib_src_libflac_include_FLAC_all_h=yes
+else
+  ac_cv_file_lib_src_libflac_include_FLAC_all_h=no
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_file_lib_src_libflac_include_FLAC_all_h" 
>&5
+echo "${ECHO_T}$ac_cv_file_lib_src_libflac_include_FLAC_all_h" >&6
+if test $ac_cv_file_lib_src_libflac_include_FLAC_all_h = yes; then
+  default_libflac="local"
+else
+  default_libflac="system"
+fi
 
-#AC_CHECK_FILE(lib-src/libflac/include/FLAC/format.h,
-#              default_libflac="local",
-#              default_libflac="system")
 
 
 if [ "$default_libmad" = "system" ] ; then
@@ -4614,9 +4635,152 @@
 
 fi
 
-#if [[ "$default_libflac" = "system" ]] ; then
-#      AC_CHECK_HEADER(FLAC/format.h, , default_libflac="no")
-#fi
+if [ "$default_libflac" = "system" ] ; then
+       if test "${ac_cv_header_FLAC_all_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for FLAC/all.h" >&5
+echo $ECHO_N "checking for FLAC/all.h... $ECHO_C" >&6
+if test "${ac_cv_header_FLAC_all_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_FLAC_all_h" >&5
+echo "${ECHO_T}$ac_cv_header_FLAC_all_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking FLAC/all.h usability" >&5
+echo $ECHO_N "checking FLAC/all.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <FLAC/all.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking FLAC/all.h presence" >&5
+echo $ECHO_N "checking FLAC/all.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <FLAC/all.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: FLAC/all.h: accepted by the compiler, 
rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: FLAC/all.h: accepted by the compiler, rejected by the 
preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: FLAC/all.h: proceeding with the 
compiler's result" >&5
+echo "$as_me: WARNING: FLAC/all.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: FLAC/all.h: present but cannot be 
compiled" >&5
+echo "$as_me: WARNING: FLAC/all.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: FLAC/all.h:     check for missing 
prerequisite headers?" >&5
+echo "$as_me: WARNING: FLAC/all.h:     check for missing prerequisite 
headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: FLAC/all.h: see the Autoconf 
documentation" >&5
+echo "$as_me: WARNING: FLAC/all.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: FLAC/all.h:     section \"Present But 
Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: FLAC/all.h:     section \"Present But Cannot Be 
Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: FLAC/all.h: proceeding with the 
preprocessor's result" >&5
+echo "$as_me: WARNING: FLAC/all.h: proceeding with the preprocessor's result" 
>&2;}
+    { echo "$as_me:$LINENO: WARNING: FLAC/all.h: in the future, the compiler 
will take precedence" >&5
+echo "$as_me: WARNING: FLAC/all.h: in the future, the compiler will take 
precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for FLAC/all.h" >&5
+echo $ECHO_N "checking for FLAC/all.h... $ECHO_C" >&6
+if test "${ac_cv_header_FLAC_all_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_FLAC_all_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_FLAC_all_h" >&5
+echo "${ECHO_T}$ac_cv_header_FLAC_all_h" >&6
+
+fi
+if test $ac_cv_header_FLAC_all_h = yes; then
+  :
+else
+  default_libflac="no"
+fi
+
+
+fi
 
 
 
@@ -4677,6 +4841,8 @@
 if test "${enable_flac+set}" = set; then
   enableval="$enable_flac"
 
+else
+  default_libflac="no"
 fi;
 
 
@@ -5066,160 +5232,23 @@
        CXXFLAGS="$CXXFLAGS -I../lib-src/libsndfile/src"
 
 
+   if [ "$enable_flac" != "no" ] ; then
+      if [ "$default_libflac" = "local" ] ; then
+         EXTRAOBJS="$EXTRAOBJS ../lib-src/libflac/src/libFLAC/.libs/libFLAC.a"
+         BUILDLIBS="$BUILDLIBS libflac/src/libFLAC/.libs/libFLAC.a"
+         CXXFLAGS="$CXXFLAGS -I../lib-src/libflac/include"
+         export CPPFLAGS="$CPPFLAGS -I`pwd`/lib-src/libflac/include"
+         if test ! -f "lib-src/libflac/Makefile"; then
+            echo "--- Configuring libflac";
 
-for ac_header in FLAC/all.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_cxx_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
 
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+subdirs="$subdirs lib-src/libflac"
 
-  ac_header_preproc=no
 fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, 
rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the 
preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the 
compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be 
compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing 
prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite 
headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf 
documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But 
Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be 
Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the 
preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" 
>&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler 
will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take 
precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists.  ##
-## ------------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-        if test x$ac_cv_header_FLAC_all_h = xyes ;
-       then
                LIBS="$LIBS -lFLAC"
         fi
+   fi
 
 
    if test ! -f "lib-src/libsndfile/Makefile"; then

Index: configure.in
===================================================================
RCS file: /cvsroot/audacity/audacity-src/configure.in,v
retrieving revision 1.64.2.16
retrieving revision 1.64.2.17
diff -u -d -r1.64.2.16 -r1.64.2.17
--- configure.in        26 Oct 2006 17:14:53 -0000      1.64.2.16
+++ configure.in        11 Nov 2006 23:24:59 -0000      1.64.2.17
@@ -172,12 +172,9 @@
               default_libsoundtouch="local",
               default_libsoundtouch="system")
 
-
-#AC_CHECK_FILE(lib-src/libflac/include/FLAC/format.h,
-#              default_libflac="local",
-#              default_libflac="system")
-dnl removed libflac check as the only place it would get used is in
-dnl libsndfile, not audacity itself
+AC_CHECK_FILE(lib-src/libflac/include/FLAC/all.h,
+              default_libflac="local",
+              default_libflac="system")
 
 dnl If any of the optional sublibraries was not found in lib-src,
 dnl we assume the user wants to use a system library.  If the
@@ -200,9 +197,9 @@
        AC_CHECK_HEADER(soundtouch/SoundTouch.h, , default_libsoundtouch="no")
 fi
 
-#if [[ "$default_libflac" = "system" ]] ; then
-#      AC_CHECK_HEADER(FLAC/format.h, , default_libflac="no")
-#fi
+if [[ "$default_libflac" = "system" ]] ; then
+       AC_CHECK_HEADER(FLAC/all.h, , default_libflac="no")
+fi
 
 dnl options
 
@@ -244,9 +241,9 @@
 
 AC_ARG_ENABLE(flac,
        [AC_HELP_STRING([--enable-flac ],
-               [enable FLAC support in local libsndfile [default=no]
+               [enable FLAC support in local libsndfile [default=yes]
                This has no effect if you use system libsndfile.])],
-       ,)
+       ,default_libflac="no")
 dnl this does nothing, because all we are after is passing through the command
 dnl line option to the local libsndfile configure
 
@@ -350,11 +347,20 @@
        dnl then libsndfile will have detected and linked against them
        dnl so we need extra (static) link flags
 
-        AC_CHECK_HEADERS(FLAC/all.h)
-        if test x$ac_cv_header_FLAC_all_h = xyes ;
-       then
+   if [[ "$enable_flac" != "no" ]] ; then
+      if [[ "$default_libflac" = "local" ]] ; then
+         EXTRAOBJS="$EXTRAOBJS ../lib-src/libflac/src/libFLAC/.libs/libFLAC.a"
+         BUILDLIBS="$BUILDLIBS libflac/src/libFLAC/.libs/libFLAC.a"
+         CXXFLAGS="$CXXFLAGS -I../lib-src/libflac/include"
+         export CPPFLAGS="$CPPFLAGS -I`pwd`/lib-src/libflac/include"
+         if test ! -f "lib-src/libflac/Makefile"; then
+            echo "--- Configuring libflac";
+            AC_CONFIG_SUBDIRS([[lib-src/libflac]])
+         fi
+      else
                LIBS="$LIBS -lFLAC"
         fi
+   fi
 
 
    if test ! -f "lib-src/libsndfile/Makefile"; then


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to