mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-10 16:43:33 +02:00
Locate and position the current Audacity source code, and clear a variety of old junk out of the way into junk-branches
This commit is contained in:
28
m4/ac_c99_func_lrint.m4
Normal file
28
m4/ac_c99_func_lrint.m4
Normal file
@@ -0,0 +1,28 @@
|
||||
dnl @synopsis AC_C99_FUNC_LRINT
|
||||
dnl
|
||||
dnl Check whether C99's lrint function is available.
|
||||
dnl @version 1.1
|
||||
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this file for any
|
||||
dnl purpose is hereby granted without fee, provided that the above copyright
|
||||
dnl and this permission notice appear in all copies. No representations are
|
||||
dnl made about the suitability of this software for any purpose. It is
|
||||
dnl provided "as is" without express or implied warranty.
|
||||
dnl
|
||||
AC_DEFUN([AC_C99_FUNC_LRINT],
|
||||
[AC_CACHE_CHECK(for lrint,
|
||||
ac_cv_c99_lrint,
|
||||
[AC_TRY_COMPILE([
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
#include <math.h>],
|
||||
[ int value = lrint (0.432) ; ], ac_cv_c99_lrint=yes, ac_cv_c99_lrint=no)])
|
||||
if test "x$ac_cv_c99_lrint" = "xyes"; then
|
||||
AC_DEFINE(HAVE_LRINT, 1,
|
||||
[Define if you have C99's lrint function.])
|
||||
fi
|
||||
])# AC_C99_LRINT
|
||||
|
28
m4/ac_c99_func_lrintf.m4
Normal file
28
m4/ac_c99_func_lrintf.m4
Normal file
@@ -0,0 +1,28 @@
|
||||
dnl @synopsis AC_C99_FUNC_LRINTF
|
||||
dnl
|
||||
dnl Check whether C99's lrintf function is available.
|
||||
dnl @version 1.1
|
||||
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this file for any
|
||||
dnl purpose is hereby granted without fee, provided that the above copyright
|
||||
dnl and this permission notice appear in all copies. No representations are
|
||||
dnl made about the suitability of this software for any purpose. It is
|
||||
dnl provided "as is" without express or implied warranty.
|
||||
dnl
|
||||
AC_DEFUN([AC_C99_FUNC_LRINTF],
|
||||
[AC_CACHE_CHECK(for lrintf,
|
||||
ac_cv_c99_lrintf,
|
||||
[AC_TRY_COMPILE([
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
#include <math.h>],
|
||||
[ int value = lrintf (0.432) ; ], ac_cv_c99_lrintf=yes, ac_cv_c99_lrintf=no)])
|
||||
if test "x$ac_cv_c99_lrintf" = "xyes"; then
|
||||
AC_DEFINE(HAVE_LRINTF, 1,
|
||||
[Define if you have C99's lrintf function.])
|
||||
fi
|
||||
])# AC_C99_LRINTF
|
||||
|
75
m4/audacity_checklib_ffmpeg.m4
Normal file
75
m4/audacity_checklib_ffmpeg.m4
Normal file
@@ -0,0 +1,75 @@
|
||||
dnl Todo: Add Audacity / FFmpeg 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_ffmpeg.m4 serial 1
|
||||
dnl Check for a copy of ffmpeg, whoose headers we will use for the importer
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_FFMPEG], [
|
||||
AC_ARG_WITH(ffmpeg,
|
||||
[AS_HELP_STRING([--with-ffmpeg],
|
||||
[use ffmpeg for import and export support ])],
|
||||
FFMPEG_ARGUMENT=$withval,
|
||||
FFMPEG_ARGUMENT="unspecified")
|
||||
|
||||
if false ; then
|
||||
AC_DEFINE(USE_FFMPEG, 1,
|
||||
[Define if ffmpeg (multi-format import and export) support should be enabled])
|
||||
fi
|
||||
|
||||
dnl Check for a system copy of ffmpeg to use. For now I'm insiting on a
|
||||
dnl current version to make maintenance easier. We need both avcodec and
|
||||
dnl avformat, so I'm going to check for both
|
||||
|
||||
PKG_CHECK_MODULES(AVCODEC, libavcodec >= 51.53,
|
||||
avcodec_available_system="yes",
|
||||
avcodec_available_system="no")
|
||||
PKG_CHECK_MODULES(AVFORMAT, libavformat >= 52.12,
|
||||
avformat_available_system="yes",
|
||||
avformat_available_system="no")
|
||||
|
||||
FFMPEG_SYSTEM_AVAILABLE="no"
|
||||
if test "x$avcodec_available_system" = "xyes" ; then
|
||||
if test "x$avformat_available_system" = "xyes" ; then
|
||||
FFMPEG_SYSTEM_AVAILABLE="yes"
|
||||
FFMPEG_SYSTEM_CXXFLAGS="$AVCODEC_CFLAGS $AVFORMAT_CFLAGS"
|
||||
FFMPEG_SYSTEM_CPPSYMBOLS="USE_FFMPEG"
|
||||
dnl build the extra object files needed to use FFmpeg. Paths inside
|
||||
dnl the audacity src/ dir, as this is subsitiuted into src/Makefile.in
|
||||
FFMPEG_SYSTEM_OPTOBJS="import/ImportFFmpeg.o export/ExportFFmpeg.o \
|
||||
export/ExportFFmpegDialogs.o"
|
||||
AC_MSG_NOTICE([FFmpeg library available as system library])
|
||||
fi
|
||||
fi
|
||||
if test "x$FFMPEG_SYSTEM_AVAILABLE" = "xno" ; then
|
||||
AC_MSG_NOTICE([FFmpeg library NOT available as system library])
|
||||
fi
|
||||
|
||||
dnl see if ffmpeg is available locally, or rather that we have some headers
|
||||
dnl in lib-src/ffmpeg/ we can use.
|
||||
FFMPEG_LOCAL_AVAILABLE="no"
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/ffmpeg/libavcodec/avcodec.h,
|
||||
avcodec_h_found="yes",
|
||||
avcodec_h_found="no")
|
||||
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/ffmpeg/libavformat/avformat.h,
|
||||
avformat_h_found="yes",
|
||||
avformat_h_found="no")
|
||||
|
||||
if test "x$avcodec_h_found" = "xyes" ; then
|
||||
if test "x$avformat_h_found" = "xyes" ; then
|
||||
FFMPEG_LOCAL_AVAILABLE="yes"
|
||||
FFMPEG_LOCAL_LIBS=""
|
||||
FFMPEG_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/ffmpeg'
|
||||
FFMPEG_LOCAL_CPPSYMBOLS="USE_FFMPEG"
|
||||
dnl build the extra object files needed to use FFmpeg. Paths inside
|
||||
dnl the audacity src/ dir, as this is subsitiuted into src/Makefile.in
|
||||
FFMPEG_LOCAL_OPTOBJS="import/ImportFFmpeg.o export/ExportFFmpeg.o \
|
||||
export/ExportFFmpegDialogs.o"
|
||||
AC_MSG_NOTICE([FFmpeg headers are available in the local tree])
|
||||
fi
|
||||
fi
|
||||
if test "x$FFMPEG_LOCAL_AVAILABLE" = "xno" ; then
|
||||
AC_MSG_NOTICE([ffmpeg library is NOT available in the local tree])
|
||||
fi
|
||||
])
|
||||
|
55
m4/audacity_checklib_libexpat.m4
Normal file
55
m4/audacity_checklib_libexpat.m4
Normal file
@@ -0,0 +1,55 @@
|
||||
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 1
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_LIBEXPAT], [
|
||||
|
||||
AC_ARG_WITH(expat,
|
||||
[AS_HELP_STRING([--with-expat],
|
||||
[which expat to use for XML file support: [system,local]])],
|
||||
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
|
||||
])
|
||||
|
72
m4/audacity_checklib_libflac.m4
Normal file
72
m4/audacity_checklib_libflac.m4
Normal file
@@ -0,0 +1,72 @@
|
||||
dnl add audacity / flac 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_libflac.m4 serial 2
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_LIBFLAC], [
|
||||
|
||||
if false ; then
|
||||
AC_DEFINE(USE_LIBFLAC, 1,
|
||||
[Define if the FLAC library is present])
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(libflac,
|
||||
[AS_HELP_STRING([--with-libflac],
|
||||
[use libFLAC for FLAC support])],
|
||||
LIBFLAC_ARGUMENT=$withval,
|
||||
LIBFLAC_ARGUMENT="unspecified")
|
||||
|
||||
dnl See if FLAC is installed in the system
|
||||
|
||||
AC_CHECK_LIB(FLAC,
|
||||
FLAC__stream_decoder_new,
|
||||
lib_found="yes",
|
||||
lib_found="no",
|
||||
-lFLAC++ -lFLAC)
|
||||
|
||||
AC_CHECK_HEADER(FLAC/format.h,
|
||||
header_found="yes",
|
||||
header_found="no")
|
||||
|
||||
if test "x$lib_found" = "xyes" && test "x$header_found" = "xyes" ; then
|
||||
LIBFLAC_SYSTEM_AVAILABLE="yes"
|
||||
LIBFLAC_SYSTEM_LIBS="-lFLAC++ -lFLAC"
|
||||
LIBFLAC_SYSTEM_CPPSYMBOLS="USE_LIBFLAC"
|
||||
# this file shouldn't be built at if no libflac is available
|
||||
LIBFLAC_SYSTEM_OPTOBJS="ondemand/ODDecodeFlacTask.o"
|
||||
AC_MSG_NOTICE([FLAC libraries are available as system libraries])
|
||||
else
|
||||
LIBFLAC_SYSTEM_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([FLAC/FLAC++ libraries are NOT available as system libraries])
|
||||
fi
|
||||
|
||||
dnl see if FLAC is available in the source dir
|
||||
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/libflac/include/FLAC/format.h,
|
||||
flac_h_available="yes",
|
||||
flac_h_available="no")
|
||||
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/libflac/include/FLAC++/decoder.h,
|
||||
flacpp_h_available="yes",
|
||||
flacpp_h_available="no")
|
||||
|
||||
if test "x$flac_h_available" = "xyes" && test "x$flacpp_h_available" = "xyes" ; then
|
||||
LIBFLAC_LOCAL_AVAILABLE="yes"
|
||||
|
||||
LIBFLAC_LOCAL_LIBS="libFLAC++.a libFLAC.a"
|
||||
|
||||
LIBFLAC_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/libflac/include'
|
||||
LIBFLAC_LOCAL_CXXFLAGS="$LIBFLAC_LOCAL_CXXFLAGS -I\$(top_srcdir)/lib-src/libflac/include"
|
||||
|
||||
LIBFLAC_LOCAL_CPPSYMBOLS="USE_LIBFLAC"
|
||||
# this file shouldn't be built at if no libflac is available
|
||||
LIBFLAC_LOCAL_OPTOBJS="ondemand/ODDecodeFlacTask.o"
|
||||
LIBFLAC_LOCAL_CONFIG_SUBDIRS="lib-src/libflac"
|
||||
|
||||
AC_MSG_NOTICE([FLAC libraries are available in this source tree])
|
||||
else
|
||||
AC_MSG_NOTICE([FLAC libraries are NOT available in this source tree])
|
||||
fi
|
||||
])
|
||||
|
59
m4/audacity_checklib_libid3tag.m4
Normal file
59
m4/audacity_checklib_libid3tag.m4
Normal file
@@ -0,0 +1,59 @@
|
||||
dnl Add audacity / libmad licence?
|
||||
dnl Please increment the serial number below whenever you alter this macro
|
||||
dnl for the benefit of automatic macro update systems
|
||||
# audacity_checklib_libid3tag.m4 serial 1
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_LIBID3TAG], [
|
||||
|
||||
AC_ARG_WITH(libid3tag,
|
||||
[AS_HELP_STRING([--with-libid3tag],
|
||||
[use libid3tag for mp3 id3 tag support])],
|
||||
LIBID3TAG_ARGUMENT=$withval,
|
||||
LIBID3TAG_ARGUMENT="unspecified")
|
||||
|
||||
if false ; then
|
||||
AC_DEFINE(USE_LIBID3TAG, 1,
|
||||
[Define if libid3tag is present])
|
||||
fi
|
||||
|
||||
dnl see if libid3tag is installed on the system
|
||||
|
||||
AC_CHECK_LIB(id3tag, id3_file_open,
|
||||
libid3tag_found="yes",
|
||||
libid3tag_found="no",
|
||||
-lz)
|
||||
|
||||
AC_CHECK_HEADER(id3tag.h,
|
||||
id3tag_h_found="yes",
|
||||
id3tag_h_found="no")
|
||||
|
||||
if test "x$libid3tag_found" = "xyes" && test "x$id3tag_h_found" = "xyes" ; then
|
||||
LIBID3TAG_SYSTEM_AVAILABLE="yes"
|
||||
LIBID3TAG_SYSTEM_LIBS=-lid3tag
|
||||
LIBID3TAG_SYSTEM_CPPSYMBOLS="USE_LIBID3TAG"
|
||||
AC_MSG_NOTICE([Libid3tag libraries are available as system libraries])
|
||||
else
|
||||
LIBID3TAG_SYSTEM_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([Libid3tag libraries are NOT available as system libraries])
|
||||
fi
|
||||
|
||||
dnl see if libid3tag is available in the local tree
|
||||
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/libid3tag/frame.h,
|
||||
frame_h_found="yes",
|
||||
frame_h_found="no")
|
||||
|
||||
|
||||
if test "x$frame_h_found" = "xyes" ; then
|
||||
LIBID3TAG_LOCAL_AVAILABLE="yes"
|
||||
LIBID3TAG_LOCAL_LIBS="libid3tag.a"
|
||||
LIBID3TAG_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/libid3tag'
|
||||
LIBID3TAG_LOCAL_CPPSYMBOLS="USE_LIBID3TAG"
|
||||
LIBID3TAG_LOCAL_CONFIG_SUBDIRS="lib-src/libid3tag"
|
||||
AC_MSG_NOTICE([libid3tag libraries are available in the local tree])
|
||||
else
|
||||
LIBID3TAG_LOCAL_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([libid3tag libraries are NOT available in the local tree])
|
||||
fi
|
||||
])
|
||||
|
58
m4/audacity_checklib_liblrdf.m4
Normal file
58
m4/audacity_checklib_liblrdf.m4
Normal file
@@ -0,0 +1,58 @@
|
||||
dnl Add Audacity / LRDF 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_liblrdf.m4 serial 1
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_LIBLRDF], [
|
||||
AC_ARG_WITH(liblrdf,
|
||||
[AS_HELP_STRING([--with-liblrdf],
|
||||
[use liblrdf for categorisation of LADSPA plugins ])],
|
||||
LIBLRDF_ARGUMENT=$withval,
|
||||
LIBLRDF_ARGUMENT="unspecified")
|
||||
|
||||
if false ; then
|
||||
AC_DEFINE(USE_LIBLRDF, 1,
|
||||
[Define if liblrdf (metadata for LADSPA plugins) support should be enabled])
|
||||
fi
|
||||
|
||||
dnl Check for a system copy of liblrdf to use. I've only tested with
|
||||
dnl version 0.4.0, this requirement might be relaxed in the future if
|
||||
dnl someone else has it working with an earlier version.
|
||||
|
||||
PKG_CHECK_MODULES(LIBLRDF, lrdf >= 0.4.0,
|
||||
liblrdf_available_system="yes",
|
||||
liblrdf_available_system="no")
|
||||
|
||||
LIBLRDF_SYSTEM_AVAILABLE="no"
|
||||
if test "x$liblrdf_available_system" = "xyes" ; then
|
||||
LIBLRDF_SYSTEM_AVAILABLE="yes"
|
||||
LIBLRDF_SYSTEM_LIBS="$LIBLRDF_LIBS"
|
||||
LIBLRDF_SYSTEM_CXXFLAGS="$LIBLRDF_CFLAGS"
|
||||
LIBLRDF_SYSTEM_CPPSYMBOLS="USE_LIBLRDF"
|
||||
AC_MSG_NOTICE([liblrdf available as system library])
|
||||
fi
|
||||
if test "x$LIBLRDF_SYSTEM_AVAILABLE" = "xno" ; then
|
||||
AC_MSG_NOTICE([liblrdf NOT available as system library])
|
||||
fi
|
||||
|
||||
dnl see if liblrdf is available locally
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/liblrdf/lrdf.h,
|
||||
lrdf_h_found="yes",
|
||||
lrdf_h_found="no")
|
||||
|
||||
if test "x$lrdf_h_found" = "xyes" ; then
|
||||
LIBLRDF_LOCAL_AVAILABLE="yes"
|
||||
LIBLRDF_LOCAL_LIBS="liblrdf.a"
|
||||
LIBLRDF_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/liblrdf'
|
||||
LIBLRDF_LOCAL_CPPSYMBOLS="USE_LIBLRDF"
|
||||
if test ! -f lib-src/liblrdf/Makefile ; then
|
||||
LIBLRDF_LOCAL_CONFIG_SUBDIRS="lib-src/liblrdf"
|
||||
fi
|
||||
AC_MSG_NOTICE([liblrdf is available in the local tree])
|
||||
else
|
||||
LIBLRDF_LOCAL_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([liblrdf is NOT available in the local tree])
|
||||
fi
|
||||
])
|
||||
|
63
m4/audacity_checklib_libmad.m4
Normal file
63
m4/audacity_checklib_libmad.m4
Normal file
@@ -0,0 +1,63 @@
|
||||
dnl Add audacity / libmad license?
|
||||
dnl Please increment the serial number below whenever you alter this macro
|
||||
dnl for the benefit of automatic macro update systems
|
||||
# audacity_checklib_libmad.m4 serial 1
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_LIBMAD], [
|
||||
|
||||
if false ; then
|
||||
AC_DEFINE(USE_LIBMAD, 1,
|
||||
[Define if mp3 support is implemented with the libmad library])
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(libmad,
|
||||
[AS_HELP_STRING([--with-libmad],
|
||||
[use libmad for mp2/3 decoding support])],
|
||||
LIBMAD_ARGUMENT=$withval,
|
||||
LIBMAD_ARGUMENT="unspecified")
|
||||
|
||||
dnl see if libmad is installed in the system >= 0.14.2b
|
||||
|
||||
PKG_CHECK_MODULES(LIBMAD, mad >= 0.14.2b,
|
||||
libmad_available_system="yes",
|
||||
libmad_available_system="no")
|
||||
|
||||
dnl if we don't have the version we want, do we have any at all?
|
||||
|
||||
AC_CHECK_LIB(mad, mad_decoder_init,
|
||||
libmad_found="yes",
|
||||
libmad_found="no")
|
||||
|
||||
if test "x$libmad_available_system" = "xyes" && test "x$libmad_found" = "xno" ; then
|
||||
AC_MSG_WARN([system installation of libmad found, but it is too old. Upgrade to at least 0.14.2b to use with Audacity])
|
||||
fi
|
||||
|
||||
if test "x$libmad_available_system" = "xyes" ; then
|
||||
LIBMAD_SYSTEM_AVAILABLE="yes"
|
||||
LIBMAD_SYSTEM_LIBS="$LIBMAD_LIBS"
|
||||
LIBMAD_SYSTEM_CXXFLAGS="$LIBMAD_CFLAGS"
|
||||
LIBMAD_SYSTEM_CPPSYMBOLS="USE_LIBMAD"
|
||||
AC_MSG_NOTICE([libmad libraries are available as system libraries])
|
||||
else
|
||||
AC_MSG_NOTICE([libmad libraries are NOT available as system libraries])
|
||||
fi
|
||||
|
||||
dnl see if libmad is available in the local tree
|
||||
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/libmad/frame.h,
|
||||
frame_h_found="yes",
|
||||
frame_h_found="no")
|
||||
|
||||
if test "x$frame_h_found" = "xyes" ; then
|
||||
LIBMAD_LOCAL_AVAILABLE="yes"
|
||||
LIBMAD_LOCAL_LIBS="libmad.a"
|
||||
LIBMAD_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/libmad'
|
||||
LIBMAD_LOCAL_CPPSYMBOLS="USE_LIBMAD"
|
||||
LIBMAD_LOCAL_CONFIG_SUBDIRS="lib-src/libmad"
|
||||
AC_MSG_NOTICE([libmad libraries are available in the local tree])
|
||||
else
|
||||
LIBMAD_LOCAL_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([libmad libraries are NOT available in the local tree])
|
||||
fi
|
||||
])
|
||||
|
45
m4/audacity_checklib_libnyquist.m4
Normal file
45
m4/audacity_checklib_libnyquist.m4
Normal file
@@ -0,0 +1,45 @@
|
||||
dnl add Audacity / Nyquist license?
|
||||
dnl Please increment the serial number below whenever you alter this macro
|
||||
dnl for the benefit of automatic macro update systems
|
||||
# audacity_checklib_libnyquist.m4 serial 1
|
||||
|
||||
dnl Check for Nyquist as a library
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_LIBNYQUIST], [
|
||||
AC_ARG_ENABLE(nyquist,
|
||||
[AS_HELP_STRING([--enable-nyquist],
|
||||
[enable Nyquist plug-in support [default=yes]])],
|
||||
LIBNYQUIST_ARGUMENT=$enableval,
|
||||
LIBNYQUIST_ARGUMENT="unspecified")
|
||||
|
||||
if false ; then
|
||||
AC_DEFINE(USE_NYQUIST, 1,
|
||||
[Define if Nyquist support should be enabled])
|
||||
fi
|
||||
|
||||
dnl Nyquist is never installed on the system
|
||||
dnl nyx is home-cooked by us, so system copy is unlikely
|
||||
LIBNYQUIST_SYSTEM_AVAILABLE="no"
|
||||
|
||||
dnl see if Nyquist is available locally
|
||||
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/libnyquist/nyx.h,
|
||||
nyx_h_found="yes",
|
||||
nyx_h_found="no")
|
||||
|
||||
if test "x$nyx_h_found" = "xyes" ; then
|
||||
LIBNYQUIST_LOCAL_AVAILABLE="yes"
|
||||
LIBNYQUIST_LOCAL_LIBS="libnyquist.a"
|
||||
LIBNYQUIST_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/libnyquist'
|
||||
LIBNYQUIST_LOCAL_CPPSYMBOLS="USE_NYQUIST"
|
||||
LIBNYQUIST_LOCAL_OPTOBJS="effects/nyquist/Nyquist.o"
|
||||
LIBNYQUIST_LOCAL_OPTOBJS="$LIBNYQUIST_LOCAL_OPTOBJS effects/nyquist/LoadNyquist.o"
|
||||
|
||||
LIBNYQUIST_LOCAL_CONFIG_SUBDIRS="lib-src/libnyquist"
|
||||
|
||||
AC_MSG_NOTICE([nyquist libraries are available in the local tree])
|
||||
else
|
||||
LIBNYQUIST_LOCAL_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([nyquist libraries are NOT available in the local tree])
|
||||
fi
|
||||
])
|
||||
|
52
m4/audacity_checklib_libraptor.m4
Normal file
52
m4/audacity_checklib_libraptor.m4
Normal file
@@ -0,0 +1,52 @@
|
||||
dnl Add Audacity / raptor license?
|
||||
dnl Please increment the serial number below whenever you alter this macro
|
||||
dnl for the benefit of automatic macro update systems
|
||||
# audacity_checklib_libraptor.m4 serial 1
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_LIBRAPTOR], [
|
||||
AC_ARG_WITH(libraptor,
|
||||
[AS_HELP_STRING([--with-libraptor],
|
||||
[libraptor is needed for categorisation of LADSPA plugins])],
|
||||
LIBRAPTOR_ARGUMENT=$withval,
|
||||
LIBRAPTOR_ARGUMENT="unspecified")
|
||||
|
||||
dnl Check for a system copy of libraptor to use.
|
||||
|
||||
PKG_CHECK_MODULES(LIBRAPTOR, raptor >= 1.4.17,
|
||||
libraptor_available_system="yes",
|
||||
libraptor_available_system="no")
|
||||
|
||||
LIBRAPTOR_SYSTEM_AVAILABLE="no"
|
||||
if test "x$libraptor_available_system" = "xyes" ; then
|
||||
LIBRAPTOR_SYSTEM_AVAILABLE="yes"
|
||||
LIBRAPTOR_SYSTEM_LIBS="$LIBRAPTOR_LIBS"
|
||||
LIBRAPTOR_SYSTEM_CXXFLAGS="$LIBRAPTOR_CFLAGS"
|
||||
AC_MSG_NOTICE([libraptor available as system library])
|
||||
fi
|
||||
if test "x$LIBRAPTOR_SYSTEM_AVAILABLE" = "xno" ; then
|
||||
AC_MSG_NOTICE([libraptor NOT available as system library])
|
||||
fi
|
||||
|
||||
dnl see if libraptor is available locally
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/libraptor/src/raptor.h,
|
||||
raptor_h_found="yes",
|
||||
raptor_h_found="no")
|
||||
|
||||
if test "x$raptor_h_found" = "xyes" ; then
|
||||
LIBRAPTOR_LOCAL_AVAILABLE="yes"
|
||||
LIBRAPTOR_LOCAL_LIBS="libraptor.a"
|
||||
LIBRAPTOR_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/libraptor/src'
|
||||
if test ! -f lib-src/libraptor/Makefile ; then
|
||||
LIBRAPTOR_LOCAL_CONFIG_SUBDIRS="lib-src/libraptor"
|
||||
fi
|
||||
AC_MSG_NOTICE([libraptor is available in the local tree])
|
||||
if test "x$LIBEXPAT_SYSTEM_AVAILABLE" = "xno" ; then
|
||||
ac_configure_args="$ac_configure_args \"--with-expat-source=${srcdir}/src/include\""
|
||||
fi
|
||||
ac_configure_args="$ac_configure_args RAPTOR_CFLAGS='-I../../libraptor/src' RAPTOR_LIBS='-L../.. -lraptor'"
|
||||
else
|
||||
LIBRAPTOR_LOCAL_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([libraptor is NOT available in the local tree])
|
||||
fi
|
||||
])
|
||||
|
46
m4/audacity_checklib_libresample.m4
Normal file
46
m4/audacity_checklib_libresample.m4
Normal file
@@ -0,0 +1,46 @@
|
||||
dnl Add Audacity license?
|
||||
dnl Please increment the serial number below whenever you alter this macro
|
||||
dnl for the benefit of automatic macro update systems
|
||||
# audacity_checklib_libresample.m4 serial 1
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_LIBRESAMPLE], [
|
||||
|
||||
AC_ARG_WITH(libresample,
|
||||
[AS_HELP_STRING([--with-libresample],
|
||||
[use libresample for sample rate conversion: [yes,no]])],
|
||||
LIBRESAMPLE_ARGUMENT=$withval,
|
||||
LIBRESAMPLE_ARGUMENT="unspecified")
|
||||
|
||||
if false ; then
|
||||
AC_DEFINE(USE_LIBRESAMPLE, 1,
|
||||
[Define if libresample support should be enabled])
|
||||
fi
|
||||
|
||||
dnl see if libresample is installed on the system
|
||||
|
||||
dnl ... but libresample isn't generally installed as a system library...
|
||||
|
||||
LIBRESAMPLE_SYSTEM_AVAILABLE="no"
|
||||
|
||||
dnl see if libresample is available locally
|
||||
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/libresample/include/libresample.h,
|
||||
resample_h_found="yes",
|
||||
resample_h_found="no")
|
||||
|
||||
if test "x$resample_h_found" = "xyes" ; then
|
||||
LIBRESAMPLE_LOCAL_AVAILABLE="yes"
|
||||
LIBRESAMPLE_LOCAL_LIBS="libresample.a"
|
||||
LIBRESAMPLE_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/libresample/include'
|
||||
LIBRESAMPLE_LOCAL_CPPSYMBOLS="USE_LIBRESAMPLE"
|
||||
|
||||
if test ! -f lib-src/libresample/Makefile ; then
|
||||
LIBRESAMPLE_LOCAL_CONFIG_SUBDIRS="lib-src/libresample"
|
||||
fi
|
||||
AC_MSG_NOTICE([libresample libraries are available in the local tree])
|
||||
else
|
||||
LIBRESAMPLE_LOCAL_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([libresample libraries are NOT available in the local tree])
|
||||
fi
|
||||
])
|
||||
|
57
m4/audacity_checklib_libsamplerate.m4
Normal file
57
m4/audacity_checklib_libsamplerate.m4
Normal file
@@ -0,0 +1,57 @@
|
||||
dnl Add Audacity / libsamplerate license?
|
||||
dnl Please increment the serial number below whenever you alter this macro
|
||||
dnl for the benefit of automatic macro update systems
|
||||
# audacity_checklib_libsamplerate.m4 serial 1
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_LIBSAMPLERATE], [
|
||||
|
||||
AC_ARG_WITH(libsamplerate,
|
||||
[AS_HELP_STRING([--with-libsamplerate],
|
||||
[use libsamplerate instead of libresample for sample rate conversion. Do not use in conjunction with VST plug-in support!])],
|
||||
LIBSAMPLERATE_ARGUMENT=$withval,
|
||||
LIBSAMPLERATE_ARGUMENT="unspecified")
|
||||
|
||||
if false ; then
|
||||
AC_DEFINE(USE_LIBSAMPLERATE, 1,
|
||||
[Define if libsamplerate support should be enabled])
|
||||
fi
|
||||
|
||||
dnl see if libsamplerate is installed on the system
|
||||
|
||||
PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.1.2,
|
||||
samplerate_available_system="yes",
|
||||
samplerate_available_system="no")
|
||||
|
||||
if test "x$samplerate_available_system" = "xyes" ; then
|
||||
LIBSAMPLERATE_SYSTEM_AVAILABLE="yes"
|
||||
LIBSAMPLERATE_SYSTEM_LIBS=$SAMPLERATE_LIBS
|
||||
LIBSAMPLERATE_SYSTEM_CXXFLAGS=$SAMPLERATE_CFLAGS
|
||||
LIBSAMPLERATE_SYSTEM_CPPSYMBOLS="USE_LIBSAMPLERATE"
|
||||
AC_MSG_NOTICE([Libsamplerate libraries are available as system libraries])
|
||||
else
|
||||
LIBSAMPLERATE_SYSTEM_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([Libsamplerate libraries are NOT available as system libraries])
|
||||
fi
|
||||
|
||||
dnl see if libsamplerate is available in the local tree
|
||||
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/libsamplerate/src/samplerate.h,
|
||||
samplerate_h_found="yes",
|
||||
samplerate_h_found="no")
|
||||
|
||||
if test "x$samplerate_h_found" = "xyes" ; then
|
||||
LIBSAMPLERATE_LOCAL_AVAILABLE="yes"
|
||||
LIBSAMPLERATE_LOCAL_LIBS="libsamplerate.a"
|
||||
LIBSAMPLERATE_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/libsamplerate/src'
|
||||
LIBSAMPLERATE_LOCAL_CPPSYMBOLS="USE_LIBSAMPLERATE"
|
||||
|
||||
if test ! -f lib-src/libsamplerate/Makefile ; then
|
||||
LIBSAMPLERATE_LOCAL_CONFIG_SUBDIRS="lib-src/libsamplerate"
|
||||
fi
|
||||
AC_MSG_NOTICE([libsamplerate libraries are available in the local tree])
|
||||
else
|
||||
LIBSAMPLERATE_LOCAL_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([libsamplerate libraries are NOT available in the local tree])
|
||||
fi
|
||||
])
|
||||
|
60
m4/audacity_checklib_libsbsms.m4
Normal file
60
m4/audacity_checklib_libsbsms.m4
Normal file
@@ -0,0 +1,60 @@
|
||||
dnl Please increment the serial number below whenever you alter this macro
|
||||
dnl for the benefit of automatic macro update systems
|
||||
# audacity_checklib_libsbsms.m4 serial 1
|
||||
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_LIBSBSMS], [
|
||||
AC_ARG_WITH(sbsms,
|
||||
[AS_HELP_STRING([--with-sbsms],
|
||||
[use libsbsms for pitch and tempo changing])],
|
||||
LIBSBSMS_ARGUMENT=$withval,
|
||||
LIBSBSMS_ARGUMENT="unspecified")
|
||||
|
||||
if false ; then
|
||||
AC_DEFINE(USE_SBSMS, 1,
|
||||
[Define if SBSMS support should be enabled])
|
||||
fi
|
||||
|
||||
dnl see if sbsms is installed on the system
|
||||
|
||||
PKG_CHECK_MODULES(SBSMS, sbsms >= 1.6.0,
|
||||
sbsms_available_system="yes",
|
||||
sbsms_available_system="no")
|
||||
|
||||
|
||||
if test "x$sbsms_available_system" = "xyes" ; then
|
||||
LIBSBSMS_SYSTEM_AVAILABLE="yes"
|
||||
LIBSBSMS_SYSTEM_LIBS=$SBSMS_LIBS
|
||||
LIBSBSMS_SYSTEM_CXXFLAGS=$SBSMS_CFLAGS
|
||||
LIBSBSMS_SYSTEM_CPPSYMBOLS="USE_SBSMS"
|
||||
AC_MSG_NOTICE([Libsbsms libraries are available as system libraries])
|
||||
else
|
||||
LIBSBSMS_SYSTEM_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([Libsbsms libraries are NOT available as system libraries])
|
||||
fi
|
||||
|
||||
dnl see if libsbsms is available locally
|
||||
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/sbsms/include/sbsms.h,
|
||||
sbsms_h_found="yes",
|
||||
sbsms_h_found="no")
|
||||
|
||||
if test "x$sbsms_h_found" = "xyes" ; then
|
||||
LIBSBSMS_LOCAL_AVAILABLE="yes"
|
||||
LIBSBSMS_LOCAL_LIBS="libsbsms.a"
|
||||
LIBSBSMS_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/sbsms/include'
|
||||
LIBSBSMS_LOCAL_CPPSYMBOLS="USE_SBSMS"
|
||||
|
||||
dnl set up configuring sbsms
|
||||
LIBSBSMS_LOCAL_CONFIG_SUBDIRS="lib-src/sbsms"
|
||||
ac_configure_args="$ac_configure_args --disable-programs"
|
||||
dnl do not build programs we don't need
|
||||
|
||||
AC_MSG_NOTICE([libsbsms libraries are available in the local tree])
|
||||
else
|
||||
LIBSBSMS_LOCAL_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([libsbsms libraries are NOT available in the local tree])
|
||||
fi
|
||||
|
||||
])
|
||||
|
55
m4/audacity_checklib_libsndfile.m4
Normal file
55
m4/audacity_checklib_libsndfile.m4
Normal file
@@ -0,0 +1,55 @@
|
||||
dnl Add audacity / libsndfile license?
|
||||
dnl Please increment the serial number below whenever you alter this macro
|
||||
dnl for the benefit of automatic macro update systems
|
||||
# audacity_checklib_libsndfile.m4 serial 2
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_LIBSNDFILE], [
|
||||
|
||||
AC_ARG_WITH(libsndfile,
|
||||
[AS_HELP_STRING([--with-libsndfile],
|
||||
[which libsndfile to use (required): [system,local]])],
|
||||
LIBSNDFILE_ARGUMENT=$withval,
|
||||
LIBSNDFILE_ARGUMENT="unspecified")
|
||||
|
||||
dnl see if libsndfile is installed in the system
|
||||
|
||||
PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.0,
|
||||
sndfile_available_system="yes",
|
||||
sndfile_available_system="no")
|
||||
|
||||
if test "x$sndfile_available_system" = "xyes" ; then
|
||||
LIBSNDFILE_SYSTEM_AVAILABLE="yes"
|
||||
LIBSNDFILE_SYSTEM_LIBS=$SNDFILE_LIBS
|
||||
LIBSNDFILE_SYSTEM_CXXFLAGS=$SNDFILE_CFLAGS
|
||||
AC_MSG_NOTICE([Libsndfile libraries are available as system libraries])
|
||||
else
|
||||
LIBSNDFILE_SYSTEM_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([Libsndfile libraries are NOT available as system libraries])
|
||||
fi
|
||||
|
||||
dnl see if libsndfile is available in the local tree
|
||||
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/libsndfile/src/sndfile.h.in,
|
||||
libsndfile_found="yes",
|
||||
libsndfile_found="no")
|
||||
|
||||
if test "x$libsndfile_found" = "xyes" ; then
|
||||
LIBSNDFILE_LOCAL_AVAILABLE="yes"
|
||||
LIBSNDFILE_LOCAL_LIBS="libsndfile.a"
|
||||
LIBSNDFILE_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/libsndfile/src'
|
||||
LIBSNDFILE_LOCAL_CONFIG_SUBDIRS="lib-src/libsndfile"
|
||||
AC_MSG_NOTICE([libsndfile libraries are available in this source tree])
|
||||
|
||||
dnl These must be visible so libvamp and sbsms can find us
|
||||
dnl export SNDFILE_LIBS="'`pwd`/lib-src/libsndfile.a'"
|
||||
dnl export SNDFILE_CFLAGS="'-I`pwd`/lib-src/libsndfile/src'"
|
||||
|
||||
dnl Temporary fix for bug #248
|
||||
ac_configure_args="$ac_configure_args --disable-sqlite --disable-external-libs --disable-alsa"
|
||||
else
|
||||
LIBSNDFILE_LOCAL_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([libsndfile libraries are NOT available in this source tree])
|
||||
fi
|
||||
|
||||
])
|
||||
|
65
m4/audacity_checklib_libsoundtouch.m4
Normal file
65
m4/audacity_checklib_libsoundtouch.m4
Normal file
@@ -0,0 +1,65 @@
|
||||
dnl Add Audacity / Soundtouch license?
|
||||
dnl Please increment the serial number below whenever you alter this macro
|
||||
dnl for the benefit of automatic macro update systems
|
||||
# audacity_checklib_libsoundtouch.m4 serial 1
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_LIBSOUNDTOUCH], [
|
||||
AC_ARG_WITH(soundtouch,
|
||||
[AS_HELP_STRING([--with-soundtouch],
|
||||
[use libSoundTouch for pitch and tempo changing])],
|
||||
LIBSOUNDTOUCH_ARGUMENT=$withval,
|
||||
LIBSOUNDTOUCH_ARGUMENT="unspecified")
|
||||
|
||||
if false ; then
|
||||
AC_DEFINE(USE_SOUNDTOUCH, 1,
|
||||
[Define if SoundTouch support should be enabled])
|
||||
fi
|
||||
|
||||
dnl see if soundtouch is installed on the system
|
||||
dnl Fustratingly, the name of the pkg-config file keeps being changed
|
||||
dnl by upstream, despite the fact that they don't need to and shouldn't.
|
||||
dnl as a result (given that 1.3.x and 1.4.0 seem to have idenditcal APIs)
|
||||
dnl we have to check for two possible pkg-config files for the same package.
|
||||
|
||||
dnl check for 1.4.x first
|
||||
PKG_CHECK_MODULES(SOUNDTOUCH, soundtouch-1.4 >= 1.3.0,
|
||||
soundtouch_available_system="yes",
|
||||
soundtouch_available_system="no")
|
||||
dnl if not there, check for 1.3.x
|
||||
if test "x$soundtouch_available_system" = "xno" ; then
|
||||
PKG_CHECK_MODULES(SOUNDTOUCH, soundtouch-1.0 >= 1.3.0,
|
||||
soundtouch_available_system="yes",
|
||||
soundtouch_available_system="no")
|
||||
fi
|
||||
|
||||
if test "x$soundtouch_available_system" = "xyes" ; then
|
||||
LIBSOUNDTOUCH_SYSTEM_AVAILABLE="yes"
|
||||
LIBSOUNDTOUCH_SYSTEM_LIBS=$SOUNDTOUCH_LIBS
|
||||
LIBSOUNDTOUCH_SYSTEM_CXXFLAGS=$SOUNDTOUCH_CFLAGS
|
||||
LIBSOUNDTOUCH_SYSTEM_CPPSYMBOLS="USE_SOUNDTOUCH"
|
||||
AC_MSG_NOTICE([Libsoundtouch libraries are available as system libraries])
|
||||
else
|
||||
LIBSOUNDTOUCH_SYSTEM_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([Libsoundtouch libraries are NOT available as system libraries])
|
||||
fi
|
||||
|
||||
dnl see if libsoundtouch is available locally
|
||||
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/soundtouch/include/SoundTouch.h,
|
||||
soundtouch_h_found="yes",
|
||||
soundtouch_h_found="no")
|
||||
|
||||
if test "x$soundtouch_h_found" = "xyes" ; then
|
||||
LIBSOUNDTOUCH_LOCAL_AVAILABLE="yes"
|
||||
LIBSOUNDTOUCH_LOCAL_LIBS="libSoundTouch.a"
|
||||
LIBSOUNDTOUCH_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/soundtouch/include'
|
||||
LIBSOUNDTOUCH_LOCAL_CPPSYMBOLS="USE_SOUNDTOUCH"
|
||||
LIBSOUNDTOUCH_LOCAL_CONFIG_SUBDIRS="lib-src/soundtouch"
|
||||
AC_MSG_NOTICE([libsoundtouch libraries are available in the local tree])
|
||||
else
|
||||
LIBSOUNDTOUCH_LOCAL_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([libsoundtouch libraries are NOT available in the local tree])
|
||||
fi
|
||||
|
||||
])
|
||||
|
59
m4/audacity_checklib_libtwolame.m4
Normal file
59
m4/audacity_checklib_libtwolame.m4
Normal file
@@ -0,0 +1,59 @@
|
||||
dnl add Audacity / Twolame license ?
|
||||
dnl Please increment the serial number below whenever you alter this macro
|
||||
dnl for the benefit of automatic macro update systems
|
||||
# audacity_checklib_libtwolame.m4 serial 1
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_LIBTWOLAME], [
|
||||
AC_ARG_WITH(libtwolame,
|
||||
[AS_HELP_STRING([--with-libtwolame],
|
||||
[use libtwolame for MP2 export support ])],
|
||||
LIBTWOLAME_ARGUMENT=$withval,
|
||||
LIBTWOLAME_ARGUMENT="unspecified")
|
||||
|
||||
if false ; then
|
||||
AC_DEFINE(USE_LIBTWOLAME, 1,
|
||||
[Define if libtwolame (MP2 export) support should be enabled])
|
||||
fi
|
||||
|
||||
dnl Check for a system copy of libtwolame to use, which needs to be
|
||||
dnl pretty current to work
|
||||
|
||||
PKG_CHECK_MODULES(LIBTWOLAME, twolame >= 0.3.9,
|
||||
twolame_available_system="yes",
|
||||
twolame_available_system="no")
|
||||
|
||||
if test "x$twolame_available_system" = "xyes" ; then
|
||||
LIBTWOLAME_SYSTEM_AVAILABLE="yes"
|
||||
LIBTWOLAME_SYSTEM_LIBS=$LIBTWOLAME_LIBS
|
||||
LIBTWOLAME_SYSTEM_CXXFLAGS=$LIBTWOLAME_CFLAGS
|
||||
LIBTWOLAME_SYSTEM_CPPSYMBOLS="USE_LIBTWOLAME"
|
||||
AC_MSG_NOTICE([Libtwolame library available as system library])
|
||||
else
|
||||
LIBTWOLAME_SYSTEM_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([Libtwolame library NOT available as system library])
|
||||
fi
|
||||
|
||||
dnl see if libtwolame is available locally
|
||||
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/twolame/libtwolame/twolame.h,
|
||||
twolame_h_found="yes",
|
||||
twolame_h_found="no")
|
||||
|
||||
if test "x$twolame_h_found" = "xyes" ; then
|
||||
LIBTWOLAME_LOCAL_AVAILABLE="yes"
|
||||
LIBTWOLAME_LOCAL_LIBS="libtwolame.a"
|
||||
LIBTWOLAME_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/twolame/libtwolame'
|
||||
LIBTWOLAME_LOCAL_CPPSYMBOLS="USE_LIBTWOLAME"
|
||||
|
||||
dnl request library is configured
|
||||
LIBTWOLAME_LOCAL_CONFIG_SUBDIRS="lib-src/twolame"
|
||||
dnl disable programs we don't need to build
|
||||
ac_configure_args="$ac_configure_args --disable-programs"
|
||||
|
||||
AC_MSG_NOTICE([libtwolame library is available in the local tree])
|
||||
else
|
||||
LIBTWOLAME_LOCAL_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([libtwolame library is NOT available in the local tree])
|
||||
fi
|
||||
])
|
||||
|
67
m4/audacity_checklib_libvamp.m4
Normal file
67
m4/audacity_checklib_libvamp.m4
Normal file
@@ -0,0 +1,67 @@
|
||||
dnl Todo: add Vamp / Audacity license?
|
||||
dnl Please increment the serial number below whenever you alter this macro
|
||||
dnl for the benefit of automatic macro update systems
|
||||
# audacity_checklib_libvamp.m4 serial 2
|
||||
|
||||
dnl Check for system copy of libvamp we can use for Vamp plug-in support
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_LIBVAMP], [
|
||||
AC_ARG_WITH(libvamp,
|
||||
[AS_HELP_STRING([--with-libvamp],
|
||||
[use libvamp for Vamp plug-in support [default=yes]])],
|
||||
LIBVAMP_ARGUMENT=$withval,
|
||||
LIBVAMP_ARGUMENT="unspecified")
|
||||
|
||||
if false ; then
|
||||
AC_DEFINE(USE_VAMP, 1,
|
||||
[Define if Vamp analysis plugin support should be enabled])
|
||||
fi
|
||||
|
||||
dnl System may include Vamp headers and library, though we prefer local ones
|
||||
|
||||
PKG_CHECK_MODULES(VAMP, vamp-hostsdk >= 2.0,
|
||||
vamp_available_system="yes",
|
||||
vamp_available_system="no")
|
||||
|
||||
if test "x$vamp_available_system" = "xyes" ; then
|
||||
LIBVAMP_SYSTEM_AVAILABLE="yes"
|
||||
LIBVAMP_SYSTEM_LIBS=$VAMP_LIBS
|
||||
LIBVAMP_SYSTEM_CXXFLAGS=$VAMP_CFLAGS
|
||||
dnl still need these local objects for the support in audacity
|
||||
LIBVAMP_SYSTEM_OPTOBJS="effects/vamp/VampEffect.o effects/vamp/LoadVamp.o"
|
||||
LIBVAMP_SYSTEM_CPPSYMBOLS="USE_VAMP"
|
||||
AC_MSG_NOTICE([Vamp libraries are available as system libraries])
|
||||
else
|
||||
LIBVAMP_SYSTEM_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([Vamp libraries are NOT available as system libraries])
|
||||
fi
|
||||
|
||||
dnl see if Vamp is available locally
|
||||
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/libvamp/vamp-hostsdk/PluginLoader.h,
|
||||
vamp_h_found="yes",
|
||||
vamp_h_found="no")
|
||||
|
||||
if test "x$vamp_h_found" = "xyes" ; then
|
||||
LIBVAMP_LOCAL_AVAILABLE="yes"
|
||||
dnl Add vamp to the list of things to build in lib-src
|
||||
LIBVAMP_LOCAL_BUILD="vamp-sdk"
|
||||
dnl compiler and linker flags
|
||||
LIBVAMP_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/libvamp'
|
||||
LIBVAMP_LOCAL_LDFLAGS='-L$(top_builddir)/lib-src/libvamp/src -lvamp-hostsdk'
|
||||
dnl add some extra object files we can build
|
||||
LIBVAMP_LOCAL_OPTOBJS="effects/vamp/VampEffect.o effects/vamp/LoadVamp.o"
|
||||
dnl define a pre-processor symbol to tell other code that the vamp host
|
||||
dnl SDK is available
|
||||
LIBVAMP_LOCAL_CPPSYMBOLS="USE_VAMP"
|
||||
dnl schedule the directory to be configured
|
||||
LIBVAMP_LOCAL_CONFIG_SUBDIRS="lib-src/libvamp"
|
||||
ac_configure_args="$ac_configure_args --disable-programs"
|
||||
dnl do not build programs we don't need
|
||||
|
||||
AC_MSG_NOTICE([Vamp libraries are available in the local tree])
|
||||
else
|
||||
LIBVAMP_LOCAL_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([Vamp libraries are NOT available in the local tree])
|
||||
fi
|
||||
])
|
||||
|
68
m4/audacity_checklib_libvorbis.m4
Normal file
68
m4/audacity_checklib_libvorbis.m4
Normal file
@@ -0,0 +1,68 @@
|
||||
dnl Add audacity / vorbis 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_libvorbis.m4 serial 1
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_LIBVORBIS], [
|
||||
|
||||
if false ; then
|
||||
AC_DEFINE(USE_LIBVORBIS, 1,
|
||||
[Define if the ogg vorbis decoding library is present])
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(libvorbis,
|
||||
[AS_HELP_STRING([--with-libvorbis],
|
||||
[use libvorbis for Ogg Vorbis support])],
|
||||
LIBVORBIS_ARGUMENT=$withval,
|
||||
LIBVORBIS_ARGUMENT="unspecified")
|
||||
|
||||
dnl See if Vorbis is installed in the system
|
||||
|
||||
AC_CHECK_LIB(vorbisfile,
|
||||
vorbis_bitrate_addblock,
|
||||
lib_found="yes",
|
||||
lib_found="no",
|
||||
-lvorbis -logg)
|
||||
|
||||
AC_CHECK_HEADER(vorbis/vorbisfile.h,
|
||||
header_found="yes",
|
||||
header_found="no")
|
||||
|
||||
if test "x$lib_found" = "xyes" && test "x$header_found" = "xyes" ; then
|
||||
LIBVORBIS_SYSTEM_AVAILABLE="yes"
|
||||
LIBVORBIS_SYSTEM_LIBS="-lvorbisenc -lvorbisfile -lvorbis -logg"
|
||||
LIBVORBIS_SYSTEM_CPPSYMBOLS="USE_LIBVORBIS"
|
||||
AC_MSG_NOTICE([Vorbis libraries are available as system libraries])
|
||||
else
|
||||
LIBVORBIS_SYSTEM_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([Vorbis libraries are NOT available as system libraries])
|
||||
fi
|
||||
|
||||
dnl see if Vorbis is available in the source dir
|
||||
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/libvorbis/include/vorbis/vorbisenc.h,
|
||||
vorbisenc_h_available="yes",
|
||||
vorbisenc_h_available="no")
|
||||
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/libogg/include/ogg/ogg.h,
|
||||
ogg_h_available="yes",
|
||||
ogg_h_available="no")
|
||||
|
||||
if test "x$vorbisenc_h_available" = "xyes" && test "x$ogg_h_available" = "xyes" ; then
|
||||
LIBVORBIS_LOCAL_AVAILABLE="yes"
|
||||
|
||||
LIBVORBIS_LOCAL_LIBS="libvorbisenc.a libvorbisfile.a libvorbis.a libogg.a"
|
||||
|
||||
LIBVORBIS_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/libogg/include'
|
||||
LIBVORBIS_LOCAL_CXXFLAGS="$LIBVORBIS_LOCAL_CXXFLAGS -I\$(top_srcdir)/lib-src/libvorbis/include"
|
||||
|
||||
LIBVORBIS_LOCAL_CPPSYMBOLS="USE_LIBVORBIS"
|
||||
|
||||
LIBVORBIS_LOCAL_CONFIG_SUBDIRS="lib-src/libogg lib-src/libvorbis"
|
||||
AC_MSG_NOTICE([Vorbis libraries are available in this source tree])
|
||||
else
|
||||
AC_MSG_NOTICE([Vorbis libraries are NOT available in this source tree])
|
||||
fi
|
||||
])
|
||||
|
53
m4/audacity_checklib_redland.m4
Normal file
53
m4/audacity_checklib_redland.m4
Normal file
@@ -0,0 +1,53 @@
|
||||
dnl add Audacity / Redland license?
|
||||
dnl Please increment the serial number below whenever you alter this macro
|
||||
dnl for the benefit of automatic macro update systems
|
||||
# audacity_checklib_redland.m4 serial 1
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_REDLAND], [
|
||||
AC_ARG_WITH(redland,
|
||||
[AS_HELP_STRING([--with-redland],
|
||||
[use Redland for reading RDF data ])],
|
||||
REDLAND_ARGUMENT=$withval,
|
||||
REDLAND_ARGUMENT="unspecified")
|
||||
|
||||
dnl Check for a system copy of Redland to use.
|
||||
PKG_CHECK_MODULES(REDLAND, redland >= 1.0.7,
|
||||
redland_available_system="yes",
|
||||
redland_available_system="no")
|
||||
REDLAND_SYSTEM_AVAILABLE="no"
|
||||
if test "x$redland_available_system" = "xyes" ; then
|
||||
REDLAND_SYSTEM_AVAILABLE="yes"
|
||||
REDLAND_SYSTEM_LIBS="$REDLAND_LIBS"
|
||||
REDLAND_SYSTEM_CXXFLAGS="$REDLAND_CFLAGS"
|
||||
AC_MSG_NOTICE([Redland available as system library])
|
||||
fi
|
||||
if test "x$REDLAND_SYSTEM_AVAILABLE" = "xno" ; then
|
||||
AC_MSG_NOTICE([Redland NOT available as system library])
|
||||
fi
|
||||
|
||||
dnl Check if Redland is available locally.
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/redland/librdf/librdf.h,
|
||||
librdf_h_found="yes",
|
||||
librdf_h_found="no")
|
||||
|
||||
if test "x$librdf_h_found" = "xyes" ; then
|
||||
REDLAND_LOCAL_AVAILABLE="yes"
|
||||
REDLAND_LOCAL_LIBS="librdf.a libraptor.a librasqal.a"
|
||||
REDLAND_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/redland/librdf -I$(top_srcdir)/lib-src/redland/raptor/src -I$(top_srcdir)/lib-src/redland/rasqal/src'
|
||||
if test ! -f lib-src/redland/Makefile ; then
|
||||
REDLAND_LOCAL_CONFIG_SUBDIRS="lib-src/redland"
|
||||
fi
|
||||
if test "x$LIBEXPAT_SYSTEM_AVAILABLE" = "xno" ; then
|
||||
# This is a horrible hack to keep from having to modify the raptor/configure.ac. It makes
|
||||
# the raptor configure think there's a full expat source tree. But, all we have is expat.h
|
||||
# tucked away in audacity/src/include. So, we trick it...
|
||||
ac_configure_args="$ac_configure_args \"--with-expat-source=dummy_magic\" CPPFLAGS='$CPPFLAGS -I../../../src/include'"
|
||||
fi
|
||||
ac_configure_args="$ac_configure_args RAPTOR_CFLAGS='-I../../redland/raptor/src' RAPTOR_LIBS='-L.. -L../.. -lraptor' REDLAND_CFLAGS='-I../../redland/raptor/src -I../../redland/rasqal/src -I../../redland/librdf' REDLAND_LIBS='-L.. -L../.. -lrdf -lraptor -lrasqal'"
|
||||
AC_MSG_NOTICE([Redland is available in the local tree])
|
||||
else
|
||||
REDLAND_LOCAL_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([Redland is NOT available in the local tree])
|
||||
fi
|
||||
])
|
||||
|
56
m4/audacity_checklib_slv2.m4
Normal file
56
m4/audacity_checklib_slv2.m4
Normal file
@@ -0,0 +1,56 @@
|
||||
dnl Add Audacity / SLV2 license?
|
||||
dnl Please increment the serial number below whenever you alter this macro
|
||||
dnl for the benefit of automatic macro update systems
|
||||
# audacity_checklib_slv2.m4 serial 1
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_SLV2], [
|
||||
AC_ARG_WITH(slv2,
|
||||
[AS_HELP_STRING([--with-slv2],
|
||||
[use SLV2 for loading LV2 plugins ])],
|
||||
SLV2_ARGUMENT=$withval,
|
||||
SLV2_ARGUMENT="unspecified")
|
||||
|
||||
if false ; then
|
||||
AC_DEFINE(USE_SLV2, 1,
|
||||
[Define if SLV2 (library for loading LV2 plugins) should be enabled])
|
||||
fi
|
||||
|
||||
dnl Check for a system copy of SLV2 to use. We need at least version 0.6.
|
||||
|
||||
PKG_CHECK_MODULES(SLV2, slv2 >= 0.6.0,
|
||||
slv2_available_system="yes",
|
||||
slv2_available_system="no")
|
||||
SLV2_SYSTEM_AVAILABLE="no"
|
||||
if test "x$slv2_available_system" = "xyes" ; then
|
||||
SLV2_SYSTEM_AVAILABLE="yes"
|
||||
SLV2_SYSTEM_LIBS="$SLV2_LIBS"
|
||||
SLV2_SYSTEM_CXXFLAGS="$SLV2_CFLAGS"
|
||||
SLV2_SYSTEM_CPPSYMBOLS="USE_SLV2"
|
||||
SLV2_SYSTEM_OPTOBJS="effects/lv2/LoadLV2.o effects/lv2/LV2Effect.o effects/lv2/LV2PortGroup.o"
|
||||
AC_MSG_NOTICE([SLV2 available as system library])
|
||||
fi
|
||||
if test "x$SLV2_SYSTEM_AVAILABLE" = "xno" ; then
|
||||
AC_MSG_NOTICE([SLV2 NOT available as system library])
|
||||
fi
|
||||
|
||||
dnl Check if SLV2 is available locally.
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/slv2/slv2/slv2.h,
|
||||
slv2_h_found="yes",
|
||||
slv2_h_found="no")
|
||||
|
||||
if test "x$slv2_h_found" = "xyes" ; then
|
||||
SLV2_LOCAL_AVAILABLE="yes"
|
||||
SLV2_LOCAL_LIBS="libslv2.a"
|
||||
SLV2_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/slv2'
|
||||
SLV2_LOCAL_CPPSYMBOLS="USE_SLV2"
|
||||
SLV2_LOCAL_OPTOBJS="effects/lv2/LoadLV2.o effects/lv2/LV2Effect.o effects/lv2/LV2PortGroup.o"
|
||||
if test ! -f lib-src/slv2/Makefile ; then
|
||||
SLV2_LOCAL_CONFIG_SUBDIRS="lib-src/slv2"
|
||||
fi
|
||||
AC_MSG_NOTICE([SLV2 is available in the local tree])
|
||||
else
|
||||
SLV2_LOCAL_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([SLV2 is NOT available in the local tree])
|
||||
fi
|
||||
])
|
||||
|
56
m4/audacity_checklib_taglib.m4
Normal file
56
m4/audacity_checklib_taglib.m4
Normal file
@@ -0,0 +1,56 @@
|
||||
dnl add Audacity / TagLib license ?
|
||||
dnl Please increment the serial number below whenever you alter this macro
|
||||
dnl for the benefit of automatic macro update systems
|
||||
# audacity_checklib_taglib.m4 serial 1
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_TAGLIB], [
|
||||
AC_ARG_WITH(taglib,
|
||||
[AS_HELP_STRING([--with-taglib],
|
||||
[use TagLib for metadata support ])],
|
||||
TAGLIB_ARGUMENT=$withval,
|
||||
TAGLIB_ARGUMENT="unspecified")
|
||||
|
||||
if false ; then
|
||||
AC_DEFINE(USE_TAGLIB, 1,
|
||||
[Define if TagLib (metadata export) support should be enabled])
|
||||
fi
|
||||
|
||||
dnl Check for a system copy of TagLib to use
|
||||
|
||||
PKG_CHECK_MODULES(TAGLIB, taglib >= 1.5,
|
||||
taglib_available_system="yes",
|
||||
taglib_available_system="no")
|
||||
|
||||
if test "x$taglib_available_system" = "xyes" ; then
|
||||
TAGLIB_SYSTEM_AVAILABLE="yes"
|
||||
TAGLIB_SYSTEM_LIBS=$TAGLIB_LIBS
|
||||
TAGLIB_SYSTEM_CXXFLAGS=$TAGLIB_CFLAGS
|
||||
TAGLIB_SYSTEM_CPPSYMBOLS="USE_TAGLIB"
|
||||
AC_MSG_NOTICE([TagLib library available as system library])
|
||||
else
|
||||
TAGLIB_SYSTEM_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([TagLib library NOT available as system library])
|
||||
fi
|
||||
|
||||
dnl see if TagLib is available locally
|
||||
|
||||
AC_CHECK_FILE(${srcdir}/lib-src/taglib/taglib/tag.h,
|
||||
tag_h_found="yes",
|
||||
tag_h_found="no")
|
||||
|
||||
if test "x$tag_h_found" = "xyes" ; then
|
||||
TAGLIB_LOCAL_AVAILABLE="yes"
|
||||
TAGLIB_LOCAL_LIBS="taglib.a"
|
||||
TAGLIB_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/taglib/taglib'
|
||||
TAGLIB_LOCAL_CPPSYMBOLS="USE_TAGLIB"
|
||||
|
||||
dnl request library is configured
|
||||
TAGLIB_LOCAL_CONFIG_SUBDIRS="lib-src/taglib"
|
||||
|
||||
AC_MSG_NOTICE([TagLib library is available in the local tree])
|
||||
else
|
||||
TAGLIB_LOCAL_AVAILABLE="no"
|
||||
AC_MSG_NOTICE([TagLib library is NOT available in the local tree])
|
||||
fi
|
||||
])
|
||||
|
76
m4/audacity_checklib_widgetextra.m4
Normal file
76
m4/audacity_checklib_widgetextra.m4
Normal file
@@ -0,0 +1,76 @@
|
||||
dnl Add Audacity/WX license?
|
||||
dnl Please increment the serial number below whenever you alter this macro
|
||||
dnl for the benefit of automatic macro update systems
|
||||
# audacity_checklib_widgetextra.m4 serial 1
|
||||
|
||||
dnl A function to check for the correct presence of lib-widget-extra in the
|
||||
dnl lib-src tree. Note that this is a mandatory library, and
|
||||
dnl that because we maintain it, we don't support system copies.
|
||||
|
||||
dnl You would have thought you could use pkg-config for this. But the
|
||||
dnl pkg-config file doesn't exist until configure has been run for
|
||||
dnl lib-widget-extra. Using AC_CONFIG_SUBDIRS, that doesn't happen until
|
||||
dnl after everything in the main configure script has happened, so
|
||||
dnl we can't detect anything about the configured library, because it isn't
|
||||
dnl configured when this runs.
|
||||
dnl To get round this we have created our own subdirectory configuration
|
||||
dnl function, AX_CONFIG_DIR based on a subset of the code that implements
|
||||
dnl AC_CONFIG_SUBDIRS.
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_WIDGETEXTRA], [
|
||||
dnl we always need to configure libwidgetextra, so just call the script
|
||||
dnl regardless.
|
||||
AX_CONFIG_DIR(["${srcdir}/lib-src/lib-widget-extra"])
|
||||
dnl having done that we get a pkg-config file we can use
|
||||
dnl add the directory with lib-widget-extra in to the pkg-config search path
|
||||
PKG_CONFIG_PATH="${srcdir}/lib-src/lib-widget-extra/:$PKG_CONFIG_PATH"
|
||||
export PKG_CONFIG_PATH
|
||||
PKG_CHECK_MODULES(WIDGETEXTRA, libwidgetextra,
|
||||
widgetextra_available="yes",
|
||||
widgetextra_available="no")
|
||||
|
||||
if test "x$widgetextra_available" != "xyes" ; then
|
||||
AC_MSG_ERROR([lib-widget-extra is required to build audacity. A copy is included in the audacity source distribution at lib-src/lib-widget-extra/.])
|
||||
fi
|
||||
dnl otherwise good - got it. Flags will be available for use in
|
||||
dnl WIDGETEXTRA_LIBS and friends
|
||||
])
|
||||
|
||||
AC_DEFUN([AUDACITY_CHECKLIB_PORTSMF], [
|
||||
|
||||
AC_ARG_WITH(midi,
|
||||
[AS_HELP_STRING([--with-midi],
|
||||
[use portSMF for Midi support ])],
|
||||
PORTSMF_ARGUMENT=$withval,
|
||||
PORTSMF_ARGUMENT="unspecified")
|
||||
if false ; then
|
||||
AC_DEFINE(USE_MIDI, 1,
|
||||
[Define if midi support should be enabled])
|
||||
fi
|
||||
|
||||
dnl we need to configure portSMF if there is a local copy
|
||||
if test -d ${srcdir}/lib-src/portsmf ; then
|
||||
AX_CONFIG_DIR(["${srcdir}/lib-src/portsmf"])
|
||||
fi
|
||||
dnl having done that we get a pkg-config file we can use
|
||||
dnl add the directory with portSMF in to the pkg-config search path
|
||||
PKG_CONFIG_PATH="${srcdir}/lib-src/portsmf/:$PKG_CONFIG_PATH"
|
||||
export PKG_CONFIG_PATH
|
||||
PKG_CHECK_MODULES(PORTSMF, portSMF,
|
||||
portsmf_available="yes",
|
||||
portsmf_available="no")
|
||||
|
||||
if test "x$portsmf_available" = "xyes" ; then
|
||||
PORTSMF_LOCAL_AVAILABLE="yes"
|
||||
PORTSMF_LOCAL_LDFLAGS=$PORTSMF_LIBS
|
||||
PORTSMF_LOCAL_CXXFLAGS=$PORTSMF_CFLAGS
|
||||
PORTSMF_LOCAL_CPPSYMBOLS="USE_MIDI"
|
||||
dnl extra objects we can now compile
|
||||
PORTSMF_LOCAL_OPTOBJS="NoteTrack.o import/ImportMIDI.o"
|
||||
dnl this bit makes sure that we compile the lib-src copy
|
||||
PORTSMF_LOCAL_BUILD="portSMF"
|
||||
else
|
||||
PORTSMF_LOCAL_AVAILABLE="no"
|
||||
fi
|
||||
])
|
||||
|
173
m4/ax_cflags_strict_prototypes.m4
Normal file
173
m4/ax_cflags_strict_prototypes.m4
Normal file
@@ -0,0 +1,173 @@
|
||||
##### http://autoconf-archive.cryp.to/ax_cflags_strict_prototypes.html
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CFLAGS_STRICT_PROTOTYPES [(shellvar [,default, [A/NA]]
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Try to find a compiler option that requires strict prototypes.
|
||||
#
|
||||
# The sanity check is done by looking at sys/signal.h which has a set
|
||||
# of macro-definitions SIG_DFL and SIG_IGN that are cast to the local
|
||||
# signal-handler type. If that signal-handler type is not fully
|
||||
# qualified then the system headers are not seen as strictly
|
||||
# prototype clean.
|
||||
#
|
||||
# For the GNU CC compiler it will be -fstrict-prototypes
|
||||
# -Wstrict-prototypes The result is added to the shellvar being
|
||||
# CFLAGS by default.
|
||||
#
|
||||
# DEFAULTS:
|
||||
#
|
||||
# - $1 shell-variable-to-add-to : CFLAGS
|
||||
# - $2 add-value-if-not-found : nothing
|
||||
# - $3 action-if-found : add value to shellvariable
|
||||
# - $4 action-if-not-found : nothing
|
||||
#
|
||||
# LAST MODIFICATION
|
||||
#
|
||||
# 2006-12-12
|
||||
#
|
||||
# COPYLEFT
|
||||
#
|
||||
# Copyright (c) 2006 Guido U. Draheim <guidod@gmx.de>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright
|
||||
# owner gives unlimited permission to copy, distribute and modify the
|
||||
# configure scripts that are the output of Autoconf when processing
|
||||
# the Macro. You need not follow the terms of the GNU General Public
|
||||
# License when using or distributing such scripts, even though
|
||||
# portions of the text of the Macro appear in them. The GNU General
|
||||
# Public License (GPL) does govern all other use of the material that
|
||||
# constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the
|
||||
# Autoconf Macro released by the Autoconf Macro Archive. When you
|
||||
# make and distribute a modified version of the Autoconf Macro, you
|
||||
# may extend this special exception to the GPL to apply to your
|
||||
# modified version as well.
|
||||
|
||||
AC_DEFUN([AX_CFLAGS_STRICT_PROTOTYPES],[dnl
|
||||
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
|
||||
AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_strict_prototypes])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for strict prototypes],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "-pedantic % -fstrict-prototypes -Wstrict-prototypes" dnl GCC
|
||||
"-pedantic % -Wstrict-prototypes" dnl try to warn atleast
|
||||
"-pedantic % -Wmissing-prototypes" dnl or another warning
|
||||
"-pedantic % -Werror-implicit-function-declaration" dnl
|
||||
"-pedantic % -Wimplicit-function-declaration" dnl
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
case ".$VAR" in
|
||||
.|.no|.no,*) ;;
|
||||
*) # sanity check with signal() from sys/signal.h
|
||||
cp config.log config.tmp
|
||||
AC_TRY_COMPILE([#include <signal.h>],[
|
||||
if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 1;
|
||||
if (signal (SIGINT, SIG_IGN) != SIG_DFL) return 2;],
|
||||
dnl the original did use test -n `$CC testprogram.c`
|
||||
[if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
|
||||
then if test `diff config.log config.tmp | grep -i warning | wc -l` != 1
|
||||
then VAR="no, suppressed, signal.h," ; fi ; fi],
|
||||
[VAR="no, suppressed, signal.h"])
|
||||
rm config.tmp
|
||||
;;
|
||||
esac
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
case ".$VAR" in
|
||||
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
.|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
|
||||
AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
|
||||
*) m4_ifvaln($3,$3,[
|
||||
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
||||
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
||||
fi ]) ;;
|
||||
esac
|
||||
AS_VAR_POPDEF([VAR])dnl
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])
|
||||
|
||||
dnl the only difference - the LANG selection... and the default FLAGS
|
||||
|
||||
AC_DEFUN([AX_CXXFLAGS_STRICT_PROTOTYPES],[dnl
|
||||
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
|
||||
AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_strict_prototypes])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for strict prototypes],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "-pedantic -Werror % -fstrict-prototypes -Wstrict-prototypes" dnl GCC
|
||||
"-pedantic -Werror % -Wstrict-prototypes" dnl try to warn atleast
|
||||
"-pedantic -Werror % -Wmissing-prototypes" dnl try to warn atleast
|
||||
"-pedantic -Werror % -Werror-implicit-function-declaration" dnl
|
||||
"-pedantic -Werror % -Wimplicit-function-declaration" dnl
|
||||
"-pedantic % -Wstrict-prototypes %% no, unsupported in C++" dnl oops
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
case ".$VAR" in
|
||||
.|.no|.no,*) ;;
|
||||
*) # sanity check with signal() from sys/signal.h
|
||||
cp config.log config.tmp
|
||||
AC_TRY_COMPILE([#include <signal.h>],[
|
||||
if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 1;
|
||||
if (signal (SIGINT, SIG_IGN) != SIG_DFL) return 2;],
|
||||
dnl the original did use test -n `$CC testprogram.c`
|
||||
[if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
|
||||
then if test `diff config.log config.tmp | grep -i warning | wc -l` != 1
|
||||
then VAR="no, suppressed, signal.h," ; fi ; fi],
|
||||
[VAR="no, suppressed, signal.h"])
|
||||
rm config.tmp
|
||||
;;
|
||||
esac
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
case ".$VAR" in
|
||||
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
.|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
|
||||
AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
|
||||
*) m4_ifvaln($3,$3,[
|
||||
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
||||
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
||||
fi ]) ;;
|
||||
esac
|
||||
AS_VAR_POPDEF([VAR])dnl
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])
|
158
m4/ax_cflags_warn_all.m4
Normal file
158
m4/ax_cflags_warn_all.m4
Normal file
@@ -0,0 +1,158 @@
|
||||
##### http://autoconf-archive.cryp.to/ax_cflags_warn_all.html
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Try to find a compiler option that enables most reasonable
|
||||
# warnings. This macro is directly derived from VL_PROG_CC_WARNINGS
|
||||
# which is split up into two AX_CFLAGS_WARN_ALL and
|
||||
# AX_CFLAGS_WARN_ALL_ANSI
|
||||
#
|
||||
# For the GNU CC compiler it will be -Wall (and -ansi -pedantic) The
|
||||
# result is added to the shellvar being CFLAGS by default.
|
||||
#
|
||||
# Currently this macro knows about GCC, Solaris C compiler, Digital
|
||||
# Unix C compiler, C for AIX Compiler, HP-UX C compiler, IRIX C
|
||||
# compiler, NEC SX-5 (Super-UX 10) C compiler, and Cray J90 (Unicos
|
||||
# 10.0.0.8) C compiler.
|
||||
#
|
||||
# - $1 shell-variable-to-add-to : CFLAGS
|
||||
# - $2 add-value-if-not-found : nothing
|
||||
# - $3 action-if-found : add value to shellvariable
|
||||
# - $4 action-if-not-found : nothing
|
||||
#
|
||||
# LAST MODIFICATION
|
||||
#
|
||||
# 2006-12-12
|
||||
#
|
||||
# COPYLEFT
|
||||
#
|
||||
# Copyright (c) 2006 Guido U. Draheim <guidod@gmx.de>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright
|
||||
# owner gives unlimited permission to copy, distribute and modify the
|
||||
# configure scripts that are the output of Autoconf when processing
|
||||
# the Macro. You need not follow the terms of the GNU General Public
|
||||
# License when using or distributing such scripts, even though
|
||||
# portions of the text of the Macro appear in them. The GNU General
|
||||
# Public License (GPL) does govern all other use of the material that
|
||||
# constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the
|
||||
# Autoconf Macro released by the Autoconf Macro Archive. When you
|
||||
# make and distribute a modified version of the Autoconf Macro, you
|
||||
# may extend this special exception to the GPL to apply to your
|
||||
# modified version as well.
|
||||
|
||||
AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl
|
||||
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
|
||||
AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_warn_all])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "-pedantic % -Wall" dnl GCC
|
||||
"-xstrconst % -v" dnl Solaris C
|
||||
"-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
|
||||
"-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
|
||||
"-ansi -ansiE % -fullwarn" dnl IRIX
|
||||
"+ESlit % +w1" dnl HP-UX C
|
||||
"-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
|
||||
"-h conform % -h msglevel 2" dnl Cray C (Unicos)
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
case ".$VAR" in
|
||||
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
.|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
|
||||
AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
|
||||
*) m4_ifvaln($3,$3,[
|
||||
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
||||
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
||||
fi ]) ;;
|
||||
esac
|
||||
AS_VAR_POPDEF([VAR])dnl
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])
|
||||
|
||||
dnl the only difference - the LANG selection... and the default FLAGS
|
||||
|
||||
AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl
|
||||
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
|
||||
AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_warn_all])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "-pedantic % -Wall" dnl GCC
|
||||
"-xstrconst % -v" dnl Solaris C
|
||||
"-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
|
||||
"-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
|
||||
"-ansi -ansiE % -fullwarn" dnl IRIX
|
||||
"+ESlit % +w1" dnl HP-UX C
|
||||
"-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
|
||||
"-h conform % -h msglevel 2" dnl Cray C (Unicos)
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
case ".$VAR" in
|
||||
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
.|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
|
||||
AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
|
||||
*) m4_ifvaln($3,$3,[
|
||||
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
||||
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
||||
fi ]) ;;
|
||||
esac
|
||||
AS_VAR_POPDEF([VAR])dnl
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])
|
||||
|
||||
dnl implementation tactics:
|
||||
dnl the for-argument contains a list of options. The first part of
|
||||
dnl these does only exist to detect the compiler - usually it is
|
||||
dnl a global option to enable -ansi or -extrawarnings. All other
|
||||
dnl compilers will fail about it. That was needed since a lot of
|
||||
dnl compilers will give false positives for some option-syntax
|
||||
dnl like -Woption or -Xoption as they think of it is a pass-through
|
||||
dnl to later compile stages or something. The "%" is used as a
|
||||
dnl delimimiter. A non-option comment can be given after "%%" marks
|
||||
dnl which will be shown but not added to the respective C/CXXFLAGS.
|
105
m4/ax_config_dir.m4
Normal file
105
m4/ax_config_dir.m4
Normal file
@@ -0,0 +1,105 @@
|
||||
dnl Add Audacity license here?
|
||||
|
||||
dnl Function to configure a sub-library now, because we need to know the result
|
||||
dnl of the configuration now in order to take decisions.
|
||||
dnl We don't worry about whether the configuration worked or not - it is
|
||||
dnl assumed that the next thing after this will be a package-specific check to
|
||||
dnl see if the package is actually available. (Hint: use pkg-config and
|
||||
dnl -uninstalled.pc files if available).
|
||||
dnl code based on a simplification of _AC_OUTPUT_SUBDIRS in
|
||||
dnl /usr/share/autoconf/autoconf/status.m4 which implements part of
|
||||
dnl AC_CONFIG_SUBDIRS
|
||||
|
||||
AC_DEFUN([AX_CONFIG_DIR], [
|
||||
# Remove --cache-file and --srcdir arguments so they do not pile up.
|
||||
ax_sub_configure_args=
|
||||
ax_prev=
|
||||
eval "set x $ac_configure_args"
|
||||
shift
|
||||
for ax_arg
|
||||
do
|
||||
if test -n "$ax_prev"; then
|
||||
ax_prev=
|
||||
continue
|
||||
fi
|
||||
case $ax_arg in
|
||||
-cache-file | --cache-file | --cache-fil | --cache-fi \
|
||||
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
|
||||
ax_prev=cache_file ;;
|
||||
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
|
||||
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
|
||||
| --c=*)
|
||||
;;
|
||||
--config-cache | -C)
|
||||
;;
|
||||
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
|
||||
ax_prev=srcdir ;;
|
||||
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
|
||||
;;
|
||||
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
|
||||
ax_prev=prefix ;;
|
||||
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
|
||||
;;
|
||||
*)
|
||||
case $ax_arg in
|
||||
*\'*) ax_arg=`echo "$ax_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
|
||||
esac
|
||||
ax_sub_configure_args="$ax_sub_configure_args '$ax_arg'" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Always prepend --prefix to ensure using the same prefix
|
||||
# in subdir configurations.
|
||||
ax_arg="--prefix=$prefix"
|
||||
case $ax_arg in
|
||||
*\'*) ax_arg=`echo "$ax_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
|
||||
esac
|
||||
ax_sub_configure_args="'$ax_arg' $ax_sub_configure_args"
|
||||
|
||||
# Pass --silent
|
||||
if test "$silent" = yes; then
|
||||
ax_sub_configure_args="--silent $ax_sub_configure_args"
|
||||
fi
|
||||
|
||||
ax_popdir=`pwd`
|
||||
AC_MSG_NOTICE([Configuring sources in $1])
|
||||
dnl for out-of-place builds srcdir and builddir will be different, and
|
||||
dnl builddir may not exist, so we must create it
|
||||
AS_MKDIR_P(["$1"])
|
||||
dnl and also set the variables. As this isn't autoconf, the following may be
|
||||
dnl risky:
|
||||
_AC_SRCDIRS(["$1"])
|
||||
cd "$1"
|
||||
|
||||
# Check for guested configure; otherwise get Cygnus style configure.
|
||||
if test -f "configure.gnu"; then
|
||||
ax_sub_configure=$ac_srcdir/configure.gnu
|
||||
elif test -f "$ac_srcdir/configure"; then
|
||||
ax_sub_configure=$ac_srcdir/configure
|
||||
elif test -f "$ac_srcdir/configure.in"; then
|
||||
# This should be Cygnus configure.
|
||||
ax_sub_configure=$ac_aux_dir/configure
|
||||
else
|
||||
AC_MSG_WARN([no configuration information is in $1])
|
||||
ax_sub_configure=
|
||||
fi
|
||||
|
||||
# The recursion is here.
|
||||
if test -n "$ax_sub_configure"; then
|
||||
# Make the cache file name correct relative to the subdirectory.
|
||||
case $cache_file in
|
||||
[[\\/]]* | ?:[[\\/]]* ) ax_sub_cache_file=$cache_file ;;
|
||||
*) # Relative name.
|
||||
ax_sub_cache_file=$ac_top_build_prefix$cache_file ;;
|
||||
esac
|
||||
|
||||
AC_MSG_NOTICE([running $SHELL $ax_sub_configure $ax_sub_configure_args --cache-file=$ax_sub_cache_file --srcdir=$ac_srcdir])
|
||||
# The eval makes quoting arguments work.
|
||||
eval "\$SHELL \"\$ax_sub_configure\" $ax_sub_configure_args \
|
||||
--cache-file=\"\$ax_sub_cache_file\" --srcdir=\"\$ax_srcdir\""
|
||||
fi
|
||||
|
||||
cd "$ax_popdir"
|
||||
AC_MSG_NOTICE([Done configuring in $1])
|
||||
])
|
||||
|
90
m4/ax_cxx_check_flag.m4
Normal file
90
m4/ax_cxx_check_flag.m4
Normal file
@@ -0,0 +1,90 @@
|
||||
##### http://autoconf-archive.cryp.to/ax_cxx_check_flag.html
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CXX_CHECK_FLAG(FLAG-TO-CHECK,[PROLOGUE],[BODY],[ACTION-IF-SUCCESS],[ACTION-IF-FAILURE])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro tests if the C++ compiler supports the flag
|
||||
# FLAG-TO-CHECK. If successfull execute ACTION-IF-SUCCESS otherwise
|
||||
# ACTION-IF-FAILURE. PROLOGUE and BODY are optional and should be
|
||||
# used as in AC_LANG_PROGRAM macro.
|
||||
#
|
||||
# This code is inspired from KDE_CHECK_COMPILER_FLAG macro. Thanks to
|
||||
# Bogdan Drozdowski <bogdandr@op.pl> for testing and bug fixes.
|
||||
#
|
||||
# LAST MODIFICATION
|
||||
#
|
||||
# 2007-11-26
|
||||
#
|
||||
# COPYLEFT
|
||||
#
|
||||
# Copyright (c) 2007 Francesco Salvestrini <salvestrini@users.sourceforge.net>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright
|
||||
# owner gives unlimited permission to copy, distribute and modify the
|
||||
# configure scripts that are the output of Autoconf when processing
|
||||
# the Macro. You need not follow the terms of the GNU General Public
|
||||
# License when using or distributing such scripts, even though
|
||||
# portions of the text of the Macro appear in them. The GNU General
|
||||
# Public License (GPL) does govern all other use of the material that
|
||||
# constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the
|
||||
# Autoconf Macro released by the Autoconf Macro Archive. When you
|
||||
# make and distribute a modified version of the Autoconf Macro, you
|
||||
# may extend this special exception to the GPL to apply to your
|
||||
# modified version as well.
|
||||
|
||||
AC_DEFUN([AX_CXX_CHECK_FLAG],[
|
||||
AC_PREREQ([2.61])
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
AC_REQUIRE([AC_PROG_SED])
|
||||
|
||||
flag=`echo "$1" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
|
||||
|
||||
AC_CACHE_CHECK([whether the C++ compiler accepts the $1 flag],
|
||||
[ax_cv_cxx_check_flag_$flag],[
|
||||
|
||||
AC_LANG_PUSH([C++])
|
||||
|
||||
save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $1"
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([$2],[$3])
|
||||
],[
|
||||
eval "ax_cv_cxx_check_flag_$flag=yes"
|
||||
],[
|
||||
eval "ax_cv_cxx_check_flag_$flag=no"
|
||||
])
|
||||
|
||||
CXXFLAGS="$save_CXXFLAGS"
|
||||
|
||||
AC_LANG_POP
|
||||
|
||||
])
|
||||
|
||||
AS_IF([eval "test \"`echo '$ax_cv_cxx_check_flag_'$flag`\" = yes"],[
|
||||
:
|
||||
$4
|
||||
],[
|
||||
:
|
||||
$5
|
||||
])
|
||||
])
|
90
m4/ax_cxxcpp_check_flag.m4
Normal file
90
m4/ax_cxxcpp_check_flag.m4
Normal file
@@ -0,0 +1,90 @@
|
||||
##### http://autoconf-archive.cryp.to/ax_cxxcpp_check_flag.html
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CXXCPP_CHECK_FLAG(FLAG-TO-CHECK,[PROLOGUE],[BODY],[ACTION-IF-SUCCESS],[ACTION-IF-FAILURE])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro tests if the C++ preprocessor supports the flag
|
||||
# FLAG-TO-CHECK. If successfull execute ACTION-IF-SUCCESS otherwise
|
||||
# ACTION-IF-FAILURE. PROLOGUE and BODY are optional and should be
|
||||
# used as in AC_LANG_PROGRAM macro.
|
||||
#
|
||||
# This code is inspired from KDE_CHECK_COMPILER_FLAG macro. Thanks to
|
||||
# Bogdan Drozdowski <bogdandr@op.pl> for testing and bug fixes.
|
||||
#
|
||||
# LAST MODIFICATION
|
||||
#
|
||||
# 2007-11-26
|
||||
#
|
||||
# COPYLEFT
|
||||
#
|
||||
# Copyright (c) 2007 Francesco Salvestrini <salvestrini@users.sourceforge.net>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright
|
||||
# owner gives unlimited permission to copy, distribute and modify the
|
||||
# configure scripts that are the output of Autoconf when processing
|
||||
# the Macro. You need not follow the terms of the GNU General Public
|
||||
# License when using or distributing such scripts, even though
|
||||
# portions of the text of the Macro appear in them. The GNU General
|
||||
# Public License (GPL) does govern all other use of the material that
|
||||
# constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the
|
||||
# Autoconf Macro released by the Autoconf Macro Archive. When you
|
||||
# make and distribute a modified version of the Autoconf Macro, you
|
||||
# may extend this special exception to the GPL to apply to your
|
||||
# modified version as well.
|
||||
|
||||
AC_DEFUN([AX_CXXCPP_CHECK_FLAG],[
|
||||
AC_PREREQ([2.61])
|
||||
AC_REQUIRE([AC_PROG_CXXCPP])
|
||||
AC_REQUIRE([AC_PROG_SED])
|
||||
|
||||
flag=`echo "$1" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
|
||||
|
||||
AC_CACHE_CHECK([whether the C++ preprocessor accepts the $1 flag],
|
||||
[ax_cv_cxxcpp_check_flag_$flag],[
|
||||
|
||||
AC_LANG_PUSH([C++])
|
||||
|
||||
save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $1"
|
||||
AC_PREPROC_IFELSE([
|
||||
AC_LANG_PROGRAM([$2],[$3])
|
||||
],[
|
||||
eval "ax_cv_cxxcpp_check_flag_$flag=yes"
|
||||
],[
|
||||
eval "ax_cv_cxxcpp_check_flag_$flag=no"
|
||||
])
|
||||
|
||||
CXXFLAGS="$save_CXXFLAGS"
|
||||
|
||||
AC_LANG_POP
|
||||
|
||||
])
|
||||
|
||||
AS_IF([eval "test \"`echo '$ax_cv_cxxcpp_check_flag_'$flag`\" = yes"],[
|
||||
:
|
||||
$4
|
||||
],[
|
||||
:
|
||||
$5
|
||||
])
|
||||
])
|
96
m4/ax_ld_check_flag.m4
Normal file
96
m4/ax_ld_check_flag.m4
Normal file
@@ -0,0 +1,96 @@
|
||||
# ===========================================================================
|
||||
# http://autoconf-archive.cryp.to/ax_ld_check_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_LD_CHECK_FLAG(FLAG-TO-CHECK,[PROLOGUE],[BODY],[ACTION-IF-SUCCESS],[ACTION-IF-FAILURE])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro tests if the C++ compiler supports the flag FLAG-TO-CHECK. If
|
||||
# successfull execute ACTION-IF-SUCCESS otherwise ACTION-IF-FAILURE.
|
||||
# PROLOGUE and BODY are optional and should be used as in AC_LANG_PROGRAM
|
||||
# macro.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# AX_LD_CHECK_FLAG([-Wl,-L/usr/lib],[],[],[
|
||||
# ...
|
||||
# ],[
|
||||
# ...
|
||||
# ])
|
||||
#
|
||||
# This code is inspired from KDE_CHECK_COMPILER_FLAG macro. Thanks to
|
||||
# Bogdan Drozdowski <bogdandr@op.pl> for testing and bug fixes.
|
||||
#
|
||||
# LAST MODIFICATION
|
||||
#
|
||||
# 2008-04-12
|
||||
#
|
||||
# COPYLEFT
|
||||
#
|
||||
# Copyright (c) 2008 Francesco Salvestrini <salvestrini@users.sourceforge.net>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Macro Archive. When you make and
|
||||
# distribute a modified version of the Autoconf Macro, you may extend this
|
||||
# special exception to the GPL to apply to your modified version as well.
|
||||
|
||||
AC_DEFUN([AX_LD_CHECK_FLAG],[
|
||||
AC_PREREQ([2.61])
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
AC_REQUIRE([AC_PROG_SED])
|
||||
|
||||
flag=`echo "$1" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
|
||||
|
||||
AC_CACHE_CHECK([whether the linker accepts the $1 flag],
|
||||
[ax_cv_ld_check_flag_$flag],[
|
||||
|
||||
#AC_LANG_PUSH([C])
|
||||
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $1"
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([$2],[$3])
|
||||
],[
|
||||
eval "ax_cv_ld_check_flag_$flag=yes"
|
||||
],[
|
||||
eval "ax_cv_ld_check_flag_$flag=no"
|
||||
])
|
||||
|
||||
LDFLAGS="$save_LDFLAGS"
|
||||
|
||||
#AC_LANG_POP
|
||||
|
||||
])
|
||||
|
||||
AS_IF([eval "test \"`echo '$ax_cv_ld_check_flag_'$flag`\" = yes"],[
|
||||
:
|
||||
$4
|
||||
],[
|
||||
:
|
||||
$5
|
||||
])
|
||||
])
|
155
m4/pkg.m4
Normal file
155
m4/pkg.m4
Normal file
@@ -0,0 +1,155 @@
|
||||
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
||||
# ----------------------------------
|
||||
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
||||
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
||||
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
|
||||
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
|
||||
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
||||
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
||||
fi
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
_pkg_min_version=m4_default([$1], [0.9.0])
|
||||
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
PKG_CONFIG=""
|
||||
fi
|
||||
|
||||
fi[]dnl
|
||||
])# PKG_PROG_PKG_CONFIG
|
||||
|
||||
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
# Check to see whether a particular set of modules exists. Similar
|
||||
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||
#
|
||||
#
|
||||
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
|
||||
# this or PKG_CHECK_MODULES is called, or make sure to call
|
||||
# PKG_CHECK_EXISTS manually
|
||||
# --------------------------------------------------------------
|
||||
AC_DEFUN([PKG_CHECK_EXISTS],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
||||
m4_ifval([$2], [$2], [:])
|
||||
m4_ifvaln([$3], [else
|
||||
$3])dnl
|
||||
fi])
|
||||
|
||||
|
||||
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
||||
# ---------------------------------------------
|
||||
m4_define([_PKG_CONFIG],
|
||||
[if test -n "$$1"; then
|
||||
pkg_cv_[]$1="$$1"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
PKG_CHECK_EXISTS([$3],
|
||||
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
|
||||
[pkg_failed=yes])
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi[]dnl
|
||||
])# _PKG_CONFIG
|
||||
|
||||
# _PKG_SHORT_ERRORS_SUPPORTED
|
||||
# -----------------------------
|
||||
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi[]dnl
|
||||
])# _PKG_SHORT_ERRORS_SUPPORTED
|
||||
|
||||
|
||||
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||
# [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
#
|
||||
# Note that if there is a possibility the first call to
|
||||
# PKG_CHECK_MODULES might not happen, you should be sure to include an
|
||||
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
||||
#
|
||||
#
|
||||
# --------------------------------------------------------------
|
||||
AC_DEFUN([PKG_CHECK_MODULES],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
||||
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
||||
|
||||
pkg_failed=no
|
||||
AC_MSG_CHECKING([for $1])
|
||||
|
||||
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
||||
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
||||
|
||||
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
||||
and $1[]_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.])
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
_PKG_SHORT_ERRORS_SUPPORTED
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
|
||||
else
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
||||
|
||||
ifelse([$4], , [AC_MSG_ERROR(dnl
|
||||
[Package requirements ($2) were not met:
|
||||
|
||||
$$1_PKG_ERRORS
|
||||
|
||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
installed software in a non-standard prefix.
|
||||
|
||||
_PKG_TEXT
|
||||
])],
|
||||
[AC_MSG_RESULT([no])
|
||||
$4])
|
||||
elif test $pkg_failed = untried; then
|
||||
ifelse([$4], , [AC_MSG_FAILURE(dnl
|
||||
[The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
path to pkg-config.
|
||||
|
||||
_PKG_TEXT
|
||||
|
||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
|
||||
[$4])
|
||||
else
|
||||
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
||||
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
||||
AC_MSG_RESULT([yes])
|
||||
ifelse([$3], , :, [$3])
|
||||
fi[]dnl
|
||||
])# PKG_CHECK_MODULES
|
52
m4/visibility.m4
Normal file
52
m4/visibility.m4
Normal file
@@ -0,0 +1,52 @@
|
||||
# visibility.m4 serial 1 (gettext-0.15)
|
||||
dnl Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
dnl Tests whether the compiler supports the command-line option
|
||||
dnl -fvisibility=hidden and the function and variable attributes
|
||||
dnl __attribute__((__visibility__("hidden"))) and
|
||||
dnl __attribute__((__visibility__("default"))).
|
||||
dnl Does *not* test for __visibility__("protected") - which has tricky
|
||||
dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
|
||||
dnl MacOS X.
|
||||
dnl Does *not* test for __visibility__("internal") - which has processor
|
||||
dnl dependent semantics.
|
||||
dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
|
||||
dnl "really only recommended for legacy code".
|
||||
dnl Set the variable CFLAG_VISIBILITY.
|
||||
dnl Defines and sets the variable HAVE_VISIBILITY.
|
||||
|
||||
AC_DEFUN([gl_VISIBILITY],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
CFLAG_VISIBILITY=
|
||||
HAVE_VISIBILITY=0
|
||||
if test -n "$GCC"; then
|
||||
AC_MSG_CHECKING([for simple visibility declarations])
|
||||
AC_CACHE_VAL(gl_cv_cc_visibility, [
|
||||
gl_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -fvisibility=hidden"
|
||||
AC_TRY_COMPILE(
|
||||
[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
|
||||
extern __attribute__((__visibility__("default"))) int exportedvar;
|
||||
extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
|
||||
extern __attribute__((__visibility__("default"))) int exportedfunc (void);],
|
||||
[],
|
||||
gl_cv_cc_visibility=yes,
|
||||
gl_cv_cc_visibility=no)
|
||||
CFLAGS="$gl_save_CFLAGS"])
|
||||
AC_MSG_RESULT([$gl_cv_cc_visibility])
|
||||
if test $gl_cv_cc_visibility = yes; then
|
||||
CFLAG_VISIBILITY="-fvisibility=hidden"
|
||||
HAVE_VISIBILITY=1
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([CFLAG_VISIBILITY])
|
||||
AC_SUBST([HAVE_VISIBILITY])
|
||||
AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
|
||||
[Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
|
||||
])
|
Reference in New Issue
Block a user