diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/ax_append_compile_flags.m4 | 63 | ||||
-rw-r--r-- | m4/ax_append_flag.m4 | 69 | ||||
-rw-r--r-- | m4/ax_check_compile_flag.m4 | 72 | ||||
-rw-r--r-- | m4/faad.m4 | 198 | ||||
-rw-r--r-- | m4/libwrap.m4 | 14 | ||||
-rw-r--r-- | m4/mpd_auto.m4 | 80 | ||||
-rw-r--r-- | m4/pkg.m4 | 157 | ||||
-rw-r--r-- | m4/pretty_print.m4 | 19 | ||||
-rw-r--r-- | m4/ucred.m4 | 32 |
9 files changed, 0 insertions, 704 deletions
diff --git a/m4/ax_append_compile_flags.m4 b/m4/ax_append_compile_flags.m4 deleted file mode 100644 index 42541700..00000000 --- a/m4/ax_append_compile_flags.m4 +++ /dev/null @@ -1,63 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS]) -# -# DESCRIPTION -# -# For every FLAG1, FLAG2 it is checked whether the compiler works with the -# flag. If it does, the flag is added FLAGS-VARIABLE -# -# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. -# CFLAGS) is used. During the check the flag is always added to the -# current language's flags. -# -# If EXTRA-FLAGS is defined, it is added to the current language's default -# flags (e.g. CFLAGS) when the check is done. The check is thus made with -# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to -# force the compiler to issue an error when a bad flag is given. -# -# NOTE: This macro depends on the AX_APPEND_FLAG and -# AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with -# AX_APPEND_LINK_FLAGS. -# -# LICENSE -# -# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.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 3 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 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. - -#serial 2 - -AC_DEFUN([AX_APPEND_COMPILE_FLAGS], -[for flag in $1; do - AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3]) -done -])dnl AX_APPEND_COMPILE_FLAGS diff --git a/m4/ax_append_flag.m4 b/m4/ax_append_flag.m4 deleted file mode 100644 index 1d38b76f..00000000 --- a/m4/ax_append_flag.m4 +++ /dev/null @@ -1,69 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE]) -# -# DESCRIPTION -# -# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space -# added in between. -# -# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. -# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains -# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly -# FLAG. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> -# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.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 3 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 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. - -#serial 2 - -AC_DEFUN([AX_APPEND_FLAG], -[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX -AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])dnl -AS_VAR_SET_IF(FLAGS, - [case " AS_VAR_GET(FLAGS) " in - *" $1 "*) - AC_RUN_LOG([: FLAGS already contains $1]) - ;; - *) - AC_RUN_LOG([: FLAGS="$FLAGS $1"]) - AS_VAR_SET(FLAGS, ["AS_VAR_GET(FLAGS) $1"]) - ;; - esac], - [AS_VAR_SET(FLAGS,["$1"])]) -AS_VAR_POPDEF([FLAGS])dnl -])dnl AX_APPEND_FLAG diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4 deleted file mode 100644 index c3a8d695..00000000 --- a/m4/ax_check_compile_flag.m4 +++ /dev/null @@ -1,72 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the current language's compiler -# or gives an error. (Warnings, however, are ignored) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# If EXTRA-FLAGS is defined, it is added to the current language's default -# flags (e.g. CFLAGS) when the check is done. The check is thus made with -# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to -# force the compiler to issue an error when a bad flag is given. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> -# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.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 3 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 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. - -#serial 2 - -AC_DEFUN([AX_CHECK_COMPILE_FLAG], -[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX -AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl -AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ - ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS - _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) -AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_COMPILE_FLAGS diff --git a/m4/faad.m4 b/m4/faad.m4 deleted file mode 100644 index 1048c566..00000000 --- a/m4/faad.m4 +++ /dev/null @@ -1,198 +0,0 @@ -AC_DEFUN([AM_PATH_FAAD], -[dnl ## -dnl faad -dnl ## - -AC_ARG_ENABLE(aac, - AS_HELP_STRING([--disable-aac], - [disable AAC support (default: enable)]),, - enable_aac=yes) - -AC_ARG_WITH(faad, - AS_HELP_STRING([--with-faad=PFX], - [prefix where faad2 is installed (optional)]),, - faad_prefix="") -AC_ARG_WITH(faad-libraries, - AS_HELP_STRING([--with-faad-libraries=DIR], - [directory where faad2 library is installed (optional)]),, - faad_libraries="") -AC_ARG_WITH(faad-includes, - AS_HELP_STRING([--with-faad-includes=DIR], - [directory where faad2 header files are installed (optional)]),, - faad_includes="") - -if test x$enable_aac = xyes; then - if test "x$faad_libraries" != "x" ; then - FAAD_LIBS="-L$faad_libraries" - elif test "x$faad_prefix" != "x" ; then - FAAD_LIBS="-L$faad_prefix/lib" - fi - - FAAD_LIBS="$FAAD_LIBS -lfaad" - - if test "x$faad_includes" != "x" ; then - FAAD_CFLAGS="-I$faad_includes" - elif test "x$faad_prefix" != "x" ; then - FAAD_CFLAGS="-I$faad_prefix/include" - fi - - oldcflags=$CFLAGS - oldlibs=$LIBS - oldcppflags=$CPPFLAGS - CFLAGS="$CFLAGS $FAAD_CFLAGS -I." - LIBS="$LIBS $FAAD_LIBS" - CPPFLAGS=$CFLAGS - AC_CHECK_HEADER(faad.h,,enable_aac=no) - if test x$enable_aac = xyes; then - AC_CHECK_DECL(FAAD2_VERSION,,enable_aac=no,[#include <faad.h>]) - fi - if test x$enable_aac = xyes; then - AC_CHECK_DECL(faacDecInit2,,enable_aac=no,[#include <faad.h>]) - fi - if test x$enable_aac = xyes; then - AC_CHECK_LIB(faad,faacDecInit2,,enable_aac=no) - if test x$enable_aac = xno; then - enable_aac=yes - AC_CHECK_LIB(faad,NeAACDecInit2,,enable_aac=no) - fi - fi - if test x$enable_aac = xyes; then - AC_MSG_CHECKING(that FAAD2 uses buffer and bufferlen) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#include <faad.h> - -int main() { - char buffer; - long bufferlen = 0; - faacDecHandle decoder; - faacDecFrameInfo frameInfo; - faacDecConfigurationPtr config; - unsigned char channels; - long sampleRate; - mp4AudioSpecificConfig mp4ASC; - - decoder = faacDecOpen(); - config = faacDecGetCurrentConfiguration(decoder); - config->outputFormat = FAAD_FMT_16BIT; - faacDecSetConfiguration(decoder,config); - AudioSpecificConfig(&buffer, bufferlen, &mp4ASC); - faacDecInit(decoder,&buffer,bufferlen,&sampleRate,&channels); - faacDecInit2(decoder,&buffer,bufferlen,&sampleRate,&channels); - faacDecDecode(decoder,&frameInfo,&buffer,bufferlen); - - return 0; -} -])],[AC_MSG_RESULT(yes);AC_DEFINE(HAVE_FAAD_BUFLEN_FUNCS,1,[Define if FAAD2 uses buflen in function calls])],[AC_MSG_RESULT(no); - AC_MSG_CHECKING(that FAAD2 can even be used) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#include <faad.h> - -int main() { - char buffer; - faacDecHandle decoder; - faacDecFrameInfo frameInfo; - faacDecConfigurationPtr config; - unsigned char channels; - long sampleRate; - long bufferlen = 0; - unsigned long dummy1_32; - unsigned char dummy2_8, dummy3_8, dummy4_8, dummy5_8, dummy6_8, - dummy7_8, dummy8_8; - - decoder = faacDecOpen(); - config = faacDecGetCurrentConfiguration(decoder); - config->outputFormat = FAAD_FMT_16BIT; - faacDecSetConfiguration(decoder,config); - AudioSpecificConfig(&buffer,&dummy1_32,&dummy2_8, - &dummy3_8,&dummy4_8,&dummy5_8, - &dummy6_8,&dummy7_8,&dummy8_8); - faacDecInit(decoder,&buffer,&sampleRate,&channels); - faacDecInit2(decoder,&buffer,bufferlen,&sampleRate,&channels); - faacDecDecode(decoder,&frameInfo,&buffer); - faacDecClose(decoder); - - return 0; -} -])],AC_MSG_RESULT(yes),[AC_MSG_RESULT(no);enable_aac=no]) - ]) - fi - if test x$enable_aac = xyes; then - AC_CHECK_MEMBERS([faacDecConfiguration.downMatrix,faacDecConfiguration.dontUpSampleImplicitSBR,faacDecFrameInfo.samplerate],,,[#include <faad.h>]) - AC_DEFINE(HAVE_FAAD,1,[Define to use FAAD2 for AAC decoding]) - else - AC_MSG_WARN([faad2 lib needed for MP4/AAC support -- disabling MP4/AAC support]) - fi - CFLAGS=$oldcflags - LIBS=$oldlibs - CPPFLAGS=$oldcppflags -fi - -if test x$enable_aac = xyes; then - oldcflags=$CFLAGS - oldlibs=$LIBS - oldcppflags=$CPPFLAGS - CFLAGS="$CFLAGS $FAAD_CFLAGS -Werror" - LIBS="$LIBS $FAAD_LIBS" - CPPFLAGS=$CFLAGS - - AC_MSG_CHECKING(for broken libfaad headers) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#include <faad.h> -#include <stddef.h> -#include <stdint.h> - -int main() { - unsigned char channels; - uint32_t sample_rate; - - faacDecInit2(NULL, NULL, 0, &sample_rate, &channels); - return 0; -} - ])], - [AC_MSG_RESULT(correct)], - [AC_MSG_RESULT(broken); - AC_DEFINE(HAVE_FAAD_LONG, 1, [Define if faad.h uses the broken "unsigned long" pointers])]) - - CFLAGS=$oldcflags - LIBS=$oldlibs - CPPFLAGS=$oldcppflags -fi - -if test x$enable_aac = xyes; then - enable_mp4=yes - MP4FF_LIBS="-lmp4ff" - - oldcflags=$CFLAGS - oldlibs=$LIBS - oldcppflags=$CPPFLAGS - CFLAGS="$CFLAGS $FAAD_CFLAGS" - LIBS="$LIBS $FAAD_LIBS $MP4FF_LIBS" - CPPFLAGS=$CFLAGS - - AC_CHECK_HEADER(mp4ff.h,,enable_mp4=no) - - if test x$enable_mp4 = xyes; then - AC_CHECK_LIB(mp4ff,mp4ff_open_read,,enable_mp4=no) - fi - - if test x$enable_mp4 = xyes; then - AC_SUBST(MP4FF_LIBS) - AC_DEFINE(HAVE_MP4, 1, [Define to use FAAD2+mp4ff for MP4 decoding]) - else - AC_MSG_WARN([libmp4ff needed for MP4 support -- disabling MP4 support]) - unset MP4FF_LIBS - fi - - CFLAGS=$oldcflags - LIBS=$oldlibs - CPPFLAGS=$oldcppflags -else - enable_mp4=no - FAAD_CFLAGS="" - FAAD_LIBS="" -fi - -AC_SUBST(FAAD_CFLAGS) -AC_SUBST(FAAD_LIBS) - -]) diff --git a/m4/libwrap.m4 b/m4/libwrap.m4 deleted file mode 100644 index 5ad3df19..00000000 --- a/m4/libwrap.m4 +++ /dev/null @@ -1,14 +0,0 @@ -dnl -dnl Usage: -dnl AC_CHECK_LIBWRAP([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -dnl - -AC_DEFUN([AC_CHECK_LIBWRAP],[ - AC_CHECK_HEADERS([tcpd.h], - AC_CHECK_LIB([wrap], [request_init], - [LIBWRAP_CFLAGS="" - LIBWRAP_LDFLAGS="-lwrap" - $1], - $2), - $2) -]) diff --git a/m4/mpd_auto.m4 b/m4/mpd_auto.m4 deleted file mode 100644 index 23713d5b..00000000 --- a/m4/mpd_auto.m4 +++ /dev/null @@ -1,80 +0,0 @@ -AC_DEFUN([MPD_AUTO_ENABLED], [ - var="enable_$1" - feature="$2" - - if eval "test x`echo '$'$var` = xauto"; then - AC_MSG_NOTICE([auto-detected $feature]) - eval "$var=yes" - fi -]) - -AC_DEFUN([MPD_AUTO_DISABLED], [ - var="enable_$1" - feature="$2" - msg="$3" - - if eval "test x`echo '$'$var` = xauto"; then - AC_MSG_WARN([$msg -- disabling $feature]) - eval "$var=no" - elif eval "test x`echo '$'$var` = xyes"; then - AC_MSG_ERROR([$feature: $msg]) - fi -]) - -dnl Check whether a prerequisite for a feature was found. This is -dnl very similar to MPD_AUTO_RESULT, but does not finalize the -dnl detection; it assumes that more checks will follow. -AC_DEFUN([MPD_AUTO_PRE], [ - name="$1" - var="enable_$1" - found="found_$name" - feature="$2" - msg="$3" - - if eval "test x`echo '$'$var` != xno" && eval "test x`echo '$'$found` = xno"; then - MPD_AUTO_DISABLED([$name], [$feature], [$msg]) - fi -]) - -AC_DEFUN([MPD_AUTO_RESULT], [ - name="$1" - var="enable_$1" - found="found_$name" - feature="$2" - msg="$3" - - if eval "test x`echo '$'$var` = xno"; then - eval "$found=no" - fi - - if eval "test x`echo '$'$found` = xyes"; then - MPD_AUTO_ENABLED([$name], [$feature]) - else - MPD_AUTO_DISABLED([$name], [$feature], [$msg]) - fi -]) - -AC_DEFUN([MPD_AUTO_PKG], [ - if eval "test x`echo '$'enable_$1` != xno"; then - PKG_CHECK_MODULES([$2], [$3], - [eval "found_$1=yes"], - [eval "found_$1=no"]) - fi - - MPD_AUTO_RESULT([$1], [$4], [$5]) -]) - -dnl Check with pkg-config first, fall back to AC_CHECK_LIB. -dnl -dnl Parameters: varname1, varname2, pkgname, libname, symname, libs, cflags, description, errmsg -AC_DEFUN([MPD_AUTO_PKG_LIB], [ - if eval "test x`echo '$'enable_$1` != xno"; then - PKG_CHECK_MODULES([$2], [$3], - [eval "found_$1=yes"], - AC_CHECK_LIB($4, $5, - [eval "found_$1=yes $2_LIBS='$6' $2_CFLAGS='$7'"], - [eval "found_$1=no"])) - fi - - MPD_AUTO_RESULT([$1], [$8], [$9]) -]) diff --git a/m4/pkg.m4 b/m4/pkg.m4 deleted file mode 100644 index c29b6c05..00000000 --- a/m4/pkg.m4 +++ /dev/null @@ -1,157 +0,0 @@ -# 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 "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -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 --errors-to-stdout --print-errors "$2"` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - 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://www.freedesktop.org/software/pkgconfig>.])], - [$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 diff --git a/m4/pretty_print.m4 b/m4/pretty_print.m4 deleted file mode 100644 index 687dceef..00000000 --- a/m4/pretty_print.m4 +++ /dev/null @@ -1,19 +0,0 @@ -AC_DEFUN([results], [ - dnl This is a hack to allow "with" names, otherwise "enable". - num=`expr $1 : 'with'` - if test "$num" != "0"; then - var="`echo '$'$1`" - else - var="`echo '$'enable_$1`" - fi - - printf '(' - if eval "test x$var = xyes"; then - printf '+' - elif test -n "$3" && eval "test x$var = x$3"; then - printf '+' - else - printf '-' - fi - printf '%s) ' "$2" -]) diff --git a/m4/ucred.m4 b/m4/ucred.m4 deleted file mode 100644 index cdc6ea3b..00000000 --- a/m4/ucred.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# Check if "struct ucred" is available. If not, try harder with -# _GNU_SOURCE. -# -# Author: Max Kellermann <max@duempel.org> - -AC_DEFUN([STRUCT_UCRED],[ - AC_MSG_CHECKING([for struct ucred]) - AC_CACHE_VAL(mpd_cv_have_struct_ucred, [ - AC_TRY_COMPILE([#include <sys/socket.h>], - [struct ucred cred;], - mpd_cv_have_struct_ucred=yes, - mpd_cv_have_struct_ucred=no) - if test x$mpd_cv_have_struct_ucred = xno; then - # glibc 2.8 forces _GNU_SOURCE on us - AC_TRY_COMPILE( - [#define _GNU_SOURCE - #include <sys/socket.h>], - [struct ucred cred;], - mpd_cv_have_struct_ucred=yes, - mpd_cv_have_struct_ucred=no) - if test x$mpd_cv_have_struct_ucred = xyes; then - # :( - CFLAGS="$CFLAGS -D_GNU_SOURCE" - fi - fi - ]) - - AC_MSG_RESULT($mpd_cv_have_struct_ucred) - if test x$mpd_cv_have_struct_ucred = xyes; then - AC_DEFINE(HAVE_STRUCT_UCRED, 1, [Define if struct ucred is present from sys/socket.h]) - fi -]) |