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

Modified Files:
        acinclude.m4 configure configure.in 
Log Message:
Allow use of system expat library


Index: acinclude.m4
===================================================================
RCS file: /cvsroot/audacity/audacity-src/acinclude.m4,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- acinclude.m4        19 Sep 2006 16:17:43 -0000      1.13
+++ acinclude.m4        23 Sep 2006 09:32:49 -0000      1.14
@@ -478,6 +478,55 @@
    fi
 ])
 
+AC_DEFUN([AUDACITY_CHECKLIB_LIBEXPAT], [
+
+   AC_ARG_WITH(expat,
+               [AC_HELP_STRING([--with-expat],
+                               [use expat for XML file support])],
+               LIBEXPAT_ARGUMENT=$withval,
+               LIBEXPAT_ARGUMENT="unspecified")
+
+   dnl see if libexpat is installed on the system
+
+   AC_CHECK_LIB(expat, XML_ParserCreate,
+                libexpat_found="yes",
+                libexpat_found="no")
+
+   expat_h_found="no"
+
+   AC_CHECK_HEADER(expat.h,
+                   expat_h_found="yes",
+                   expat_h_found="no")
+
+   if test "x$libexpat_found" = "xyes" && test "x$expat_h_found" = "xyes" ; 
then
+      LIBEXPAT_SYSTEM_AVAILABLE="yes"
+      LIBEXPAT_SYSTEM_LIBS="-lexpat"
+      LIBEXPAT_SYSTEM_CPPSYMBOLS="USE_SYSTEM_EXPAT"
+      AC_MSG_NOTICE([Expat libraries are available as system libraries])
+   else
+      LIBEXPAT_SYSTEM_AVAILABLE="no"
+      AC_MSG_NOTICE([Expat libraries are NOT available as system libraries])
+   fi
+
+   dnl see if expat is available in the local tree
+
+   AC_CHECK_FILE(${srcdir}/lib-src/expat/xmlparse/xmlparse.h,
+                 xmlparse_h_found="yes",
+                 xmlparse_h_found="no")
+
+   if test "x$xmlparse_h_found" = "xyes" ; then
+      LIBEXPAT_LOCAL_AVAILABLE="yes"
+      LIBEXPAT_LOCAL_LIBS="expat.a"
+      LIBEXPAT_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/expat'
+      LIBEXPAT_LOCAL_CPPSYMBOLS="USE_LOCAL_EXPAT"
+
+      AC_MSG_NOTICE([Expat libraries are available in the local tree])
+   else
+      LIBEXPAT_LOCAL_AVAILABLE="no"
+      AC_MSG_NOTICE([Expat libraries are NOT available in the local tree])
+   fi
+])
+
 dnl @synopsis AC_C99_FUNC_LRINT
 dnl
 dnl Check whether C99's lrint function is available.

Index: configure
===================================================================
RCS file: /cvsroot/audacity/audacity-src/configure,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- configure   19 Sep 2006 17:39:14 -0000      1.90
+++ configure   23 Sep 2006 09:32:49 -0000      1.91
@@ -1,9 +1,8 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60a.
+# Generated by GNU Autoconf 2.59.
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003 Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 ## --------------------- ##
[...9095 lines suppressed...]
 
-      { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure 
$ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
-echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args 
--cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+      { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args 
--cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+echo "$as_me: running $ac_sub_configure $ac_sub_configure_args 
--cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
       # The eval makes quoting arguments work.
-      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
-          --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+      eval $ac_sub_configure $ac_sub_configure_args \
+          --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir ||
        { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" 
>&5
 echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
    { (exit 1); exit 1; }; }
     fi
 
-    cd "$ac_popdir"
+    cd $ac_popdir
   done
 fi
 

Index: configure.in
===================================================================
RCS file: /cvsroot/audacity/audacity-src/configure.in,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- configure.in        19 Sep 2006 17:39:14 -0000      1.85
+++ configure.in        23 Sep 2006 09:32:50 -0000      1.86
@@ -124,7 +124,7 @@
             lib_preference=$withval,
             lib_preference="system local")
 
-LIBRARIES="LIBVORBIS LIBMAD LIBSNDFILE LIBFLAC LIBID3TAG LIBSAMPLERATE 
LIBRESAMPLE LIBSOUNDTOUCH LIBNYQUIST"
+LIBRARIES="LIBVORBIS LIBMAD LIBSNDFILE LIBFLAC LIBID3TAG LIBSAMPLERATE 
LIBRESAMPLE LIBSOUNDTOUCH LIBNYQUIST LIBEXPAT"
 
 AC_MSG_NOTICE([Determining what libraries are available in this tree and on 
the system])
 
@@ -137,6 +137,7 @@
 AUDACITY_CHECKLIB_LIBRESAMPLE
 AUDACITY_CHECKLIB_LIBSOUNDTOUCH
 AUDACITY_CHECKLIB_LIBNYQUIST
+AUDACITY_CHECKLIB_LIBEXPAT
 
 dnl Decide what libraries to build with, and whether to use system or local 
libraries
 dnl Set variables based on choices.
@@ -196,6 +197,14 @@
    AC_MSG_ERROR([Audacity requires libsndfile to be enabled])
 fi
 
+if test "$LIBEXPAT_USE_LOCAL" != "yes" && test "$LIBEXPAT_USE_SYSTEM" != "yes" 
; then
+   AC_MSG_ERROR([Audacity requires expat to be enabled])
+else
+   if test "$LIBEXPAT_USE_SYSTEM" = "yes" ; then
+      AC_DEFINE(USE_SYSTEM_EXPAT, 1, [Use system Expat library])
+   fi
+fi
+
 if test "$LIBRESAMPLE_USE_LOCAL" = "yes" || test "$LIBRESAMPLE_USE_SYSTEM" = 
"yes" ; then
    LIBSAMPLERATE_USE_LOCAL="no"
    LIBSAMPLERATE_USE_SYSTEM="no"
@@ -232,8 +241,8 @@
    fi
 done
 
-LOCAL_LIBS="$LOCAL_LIBS expat.a"
-CXXFLAGS="$CXXFLAGS -I\$(top_srcdir)/lib-src/expat"
+dnl LOCAL_LIBS="$LOCAL_LIBS expat.a"
+dnl CXXFLAGS="$CXXFLAGS -I\$(top_srcdir)/lib-src/expat"
 
 dnl TODO enable/disable allegro
 LOCAL_LIBS="$LOCAL_LIBS allegro.a"


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to