mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-10 16:43:33 +02:00
Add expat 2.1.0 for Windows, Mac, and for local Linux builds (use system expat otherwise)
This commit is contained in:
60
m4/audacity_checklib_libexpat.m4
Normal file
60
m4/audacity_checklib_libexpat.m4
Normal file
@@ -0,0 +1,60 @@
|
||||
dnl add license?
|
||||
dnl
|
||||
dnl Please increment the serial number below whenever you alter this macro
|
||||
dnl for the benefit of automatic macro update systems
|
||||
# audacity_checklib_libexpat.m4 serial 2
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_EXPAT], [
|
||||
|
||||
AC_ARG_WITH(expat,
|
||||
[AS_HELP_STRING([--with-expat],
|
||||
[which expat to use for XML file support: [system,local]])],
|
||||
EXPAT_ARGUMENT=$withval,
|
||||
EXPAT_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
|
||||
EXPAT_SYSTEM_AVAILABLE="yes"
|
||||
EXPAT_SYSTEM_LIBS="-lexpat"
|
||||
EXPAT_SYSTEM_CPPSYMBOLS="USE_SYSTEM_EXPAT"
|
||||
AC_MSG_NOTICE([Expat libraries are available as system libraries])
|
||||
else
|
||||
EXPAT_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/lib/expat.h,
|
||||
xmlparse_h_found="yes",
|
||||
xmlparse_h_found="no")
|
||||
|
||||
if test "x$xmlparse_h_found" = "xyes" ; then
|
||||
EXPAT_LOCAL_AVAILABLE="yes"
|
||||
EXPAT_LOCAL_LIBS="libexpat.a"
|
||||
EXPAT_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/expat'
|
||||
EXPAT_LOCAL_CPPSYMBOLS="USE_LOCAL_EXPAT"
|
||||
|
||||
AC_MSG_NOTICE([Expat libraries are available in the local tree])
|
||||
else
|
||||
EXPAT_LOCAL_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([Expat libraries are NOT available in the local tree])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([AUDACITY_CONFIG_SUBDIRS_EXPAT], [
|
||||
if test "$EXPAT_USE_LOCAL" = yes; then
|
||||
AC_CONFIG_SUBDIRS([lib-src/expat])
|
||||
fi
|
||||
])
|
Reference in New Issue
Block a user