mirror of https://github.com/mono/CppSharp.git
6 changed files with 0 additions and 499 deletions
@ -1,12 +0,0 @@
@@ -1,12 +0,0 @@
|
||||
|
||||
EXTRA_DIST = m4/expansions.m4 |
||||
|
||||
SUBDIRS = src |
||||
|
||||
if ENABLE_DEBUG |
||||
SUBDIRS += tests |
||||
endif |
||||
|
||||
if ENABLE_EXAMPLES |
||||
SUBDIRS += examples |
||||
endif |
@ -1,118 +0,0 @@
@@ -1,118 +0,0 @@
|
||||
VALID_CULTURES = ar bg ca zh-CHS cs da de el en es fi fr he hu is it ja ko nl no pl pt ro ru hr sk sq sv th tr id uk be sl et lv lt fa vi hy eu mk af ka fo hi sw gu ta te kn mr gl kok ar-SA bg-BG ca-ES zh-TW cs-CZ da-DK de-DE el-GR en-US fi-FI fr-FR he-IL hu-HU is-IS it-IT ja-JP ko-KR nl-NL nb-NO pl-PL pt-BR ro-RO ru-RU hr-HR sk-SK sq-AL sv-SE th-TH tr-TR id-ID uk-UA be-BY sl-SI et-EE lv-LV lt-LT fa-IR vi-VN hy-AM eu-ES mk-MK af-ZA ka-GE fo-FO hi-IN sw-KE gu-IN ta-IN te-IN kn-IN mr-IN gl-ES kok-IN ar-IQ zh-CN de-CH en-GB es-MX fr-BE it-CH nl-BE nn-NO pt-PT sv-FI ar-EG zh-HK de-AT en-AU es-ES fr-CA ar-LY zh-SG de-LU en-CA es-GT fr-CH ar-DZ zh-MO en-NZ es-CR fr-LU ar-MA en-IE es-PA ar-TN en-ZA es-DO ar-OM es-VE ar-YE es-CO ar-SY es-PE ar-JO en-TT es-AR ar-LB en-ZW es-EC ar-KW en-PH es-CL ar-AE es-UY ar-BH es-PY ar-QA es-BO es-SV es-HN es-NI es-PR zh-CHT |
||||
|
||||
s2q=$(subst \ ,?,$1) |
||||
q2s=$(subst ?,\ ,$1) |
||||
# use this when result will be quoted
|
||||
unesc2=$(subst ?, ,$1) |
||||
|
||||
build_sources = $(FILES) $(GENERATED_FILES) |
||||
build_sources_esc= $(call s2q,$(build_sources)) |
||||
# use unesc2, as build_sources_embed is quoted
|
||||
build_sources_embed= $(call unesc2,$(build_sources_esc:%='$(srcdir)/%')) |
||||
|
||||
comma__=, |
||||
get_resource_name = $(firstword $(subst $(comma__), ,$1)) |
||||
get_culture = $(lastword $(subst ., ,$(basename $1))) |
||||
is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1))))) |
||||
|
||||
RESOURCES_ESC=$(call s2q,$(RESOURCES)) |
||||
|
||||
build_resx_list = $(foreach res, $(RESOURCES_ESC), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),)) |
||||
build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) |
||||
build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES_ESC)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) |
||||
build_others_list = $(build_non_culture_others_list) |
||||
build_xamlg_list = $(filter %.xaml.g.cs, $(FILES)) |
||||
|
||||
# resgen all .resx resources
|
||||
build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res))) |
||||
build_resx_resources_esc = $(build_resx_files:.resx=.resources) |
||||
build_resx_resources = $(call q2s,$(build_resx_resources_esc)) |
||||
|
||||
# embed resources for the main assembly
|
||||
build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list)) |
||||
# use unesc2, as build_resx_resources_embed is quoted
|
||||
build_resx_resources_embed = $(call unesc2,$(build_resx_resources_hack:%='-resource:%')) |
||||
build_others_files = $(call q2s,$(foreach res, $(build_others_list),$(call get_resource_name,$(res)))) |
||||
build_others_resources = $(build_others_files) |
||||
# use unesc2, as build_others_resources_embed is quoted
|
||||
build_others_resources_embed = $(call unesc2,$(build_others_list:%='-resource:$(srcdir)/%')) |
||||
|
||||
build_resources = $(build_resx_resources) $(build_others_resources) |
||||
build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed) |
||||
|
||||
# -usesourcepath is available only for resgen2
|
||||
emit_resgen_target_1=$(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); cd '$$(shell dirname '$$<')' && MONO_IOMAP=drive $$(RESGEN) '$$(shell basename '$$<')' '$$(shell basename '$$@')' |
||||
emit_resgen_target_2=$(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); MONO_IOMAP=drive $$(RESGEN) -usesourcepath '$$<' '$$@' |
||||
|
||||
emit_resgen_target=$(if $(filter resgen2,$(RESGEN)),$(emit_resgen_target_2),$(emit_resgen_target_1)) |
||||
emit_resgen_targets=$(foreach res,$(build_resx_resources_esc),$(eval $(call emit_resgen_target,$(res)))) |
||||
|
||||
build_references_ref = $(call q2s,$(foreach ref, $(call s2q,$(REFERENCES)), $(if $(filter -pkg:%, $(ref)), $(ref), $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref))))) |
||||
build_references_ref += $(call q2s,$(foreach ref, $(call s2q,$(DLL_REFERENCES)), -r:$(ref))) |
||||
build_references_ref += $(call q2s,$(foreach ref, $(call s2q,$(PROJECT_REFERENCES)), -r:$(ref))) |
||||
|
||||
s2q2s=$(call unesc2,$(call s2q,$1)) |
||||
cp_actual=test -z $1 || cp $1 $2 |
||||
cp=$(call cp_actual,'$(call s2q2s,$1)','$(call s2q2s,$2)') |
||||
|
||||
rm_actual=test -z '$1' || rm -f '$2' |
||||
rm=$(call rm_actual,$(call s2q2s,$1),$(call s2q2s,$2)/$(shell basename '$(call s2q2s,$1)')) |
||||
|
||||
EXTRA_DIST += $(build_sources) $(build_resx_files) $(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) $(DATA_FILES) $(build_culture_res_files) |
||||
CLEANFILES += $(ASSEMBLY) $(ASSEMBLY).mdb $(BINARIES) $(build_resx_resources) $(build_satellite_assembly_list) |
||||
DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/* |
||||
|
||||
pkglib_SCRIPTS = $(ASSEMBLY) |
||||
bin_SCRIPTS = $(BINARIES) |
||||
|
||||
programfilesdir = @libdir@/@PACKAGE@ |
||||
programfiles_DATA = $(PROGRAMFILES) |
||||
linuxpkgconfigdir = @libdir@/pkgconfig |
||||
linuxpkgconfig_DATA = $(LINUX_PKGCONFIG) |
||||
|
||||
|
||||
# macros
|
||||
|
||||
# $(call emit-deploy-target,deploy-variable-name)
|
||||
define emit-deploy-target |
||||
$($1): $($1_SOURCE) |
||||
mkdir -p '$$(shell dirname '$$@')' |
||||
cp '$$<' '$$@' |
||||
endef |
||||
|
||||
# $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x)
|
||||
# assumes that for a wrapper foo.pc its source template is foo.pc.in
|
||||
# if $3 is non-empty then wrapper is marked exec
|
||||
define emit-deploy-wrapper |
||||
$($1): $2 |
||||
mkdir -p '$$(shell dirname '$$@')' |
||||
cp '$$<' '$$@' |
||||
$(if $3,chmod +x '$$@') |
||||
|
||||
endef |
||||
|
||||
# generating satellite assemblies
|
||||
|
||||
culture_resources = $(foreach res, $(RESOURCES_ESC), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res))) |
||||
cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res))))) |
||||
culture_resource_dependencies = $(call q2s,$(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2)) |
||||
culture_resource_commandlines = $(call unesc2,cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)') |
||||
build_satellite_assembly_list = $(call q2s,$(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME))) |
||||
build_culture_res_files = $(call q2s,$(foreach res, $(culture_resources),$(call get_resource_name,$(res)))) |
||||
install_satellite_assembly_list = $(subst $(BUILD_DIR),$(DESTDIR)$(libdir)/$(PACKAGE),$(build_satellite_assembly_list)) |
||||
|
||||
$(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res)))))) |
||||
$(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res))))) |
||||
|
||||
$(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME): |
||||
mkdir -p '$(@D)' |
||||
$(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*) |
||||
|
||||
$(install_satellite_assembly_list): |
||||
mkdir -p '$(@D)' |
||||
cp $(subst $(DESTDIR)$(libdir)/$(PACKAGE), $(BUILD_DIR), $@) $@ |
||||
|
||||
install-satellite-assemblies: $(install_satellite_assembly_list) |
||||
|
||||
uninstall-satellite-assemblies: |
||||
rm -rf $(install_satellite_assembly_list) |
@ -1,83 +0,0 @@
@@ -1,83 +0,0 @@
|
||||
#! /bin/sh |
||||
|
||||
PROJECT=cxxi |
||||
FILE= |
||||
CONFIGURE=configure.ac |
||||
|
||||
: ${AUTOCONF=autoconf} |
||||
: ${AUTOHEADER=autoheader} |
||||
: ${AUTOMAKE=automake} |
||||
: ${LIBTOOLIZE=libtoolize} |
||||
: ${ACLOCAL=aclocal} |
||||
: ${LIBTOOL=libtool} |
||||
|
||||
srcdir=`dirname $0` |
||||
test -z "$srcdir" && srcdir=. |
||||
|
||||
ORIGDIR=`pwd` |
||||
cd $srcdir |
||||
TEST_TYPE=-f |
||||
aclocalinclude="-I . -I m4 $ACLOCAL_FLAGS" |
||||
|
||||
DIE=0 |
||||
|
||||
($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || { |
||||
echo |
||||
echo "You must have autoconf installed to compile $PROJECT." |
||||
echo "Download the appropriate package for your distribution," |
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" |
||||
DIE=1 |
||||
} |
||||
|
||||
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || { |
||||
echo |
||||
echo "You must have automake installed to compile $PROJECT." |
||||
echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4.tar.gz" |
||||
echo "(or a newer version if it is available)" |
||||
DIE=1 |
||||
} |
||||
|
||||
(grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null) && { |
||||
($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || { |
||||
echo |
||||
echo "**Error**: You must have \`libtool' installed to compile $PROJECT." |
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" |
||||
echo "(or a newer version if it is available)" |
||||
DIE=1 |
||||
} |
||||
} |
||||
|
||||
if test "$DIE" -eq 1; then |
||||
exit 1 |
||||
fi |
||||
|
||||
#test $TEST_TYPE $FILE || { |
||||
# echo "You must run this script in the top-level $PROJECT directory" |
||||
# exit 1 |
||||
#} |
||||
|
||||
if test -z "$*"; then |
||||
echo "I am going to run ./configure with no arguments - if you wish " |
||||
echo "to pass any to it, please specify them on the $0 command line." |
||||
fi |
||||
|
||||
case $CC in |
||||
*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;; |
||||
esac |
||||
|
||||
(grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null) && { |
||||
echo "Running $LIBTOOLIZE ..." |
||||
$LIBTOOLIZE --force --copy |
||||
} |
||||
|
||||
echo "Running $ACLOCAL $aclocalinclude ..." |
||||
$ACLOCAL $aclocalinclude |
||||
|
||||
echo "Running $AUTOMAKE --gnu $am_opt ..." |
||||
$AUTOMAKE --add-missing --gnu $am_opt |
||||
|
||||
echo "Running $AUTOCONF ..." |
||||
$AUTOCONF |
||||
|
||||
echo Running $srcdir/configure $conf_flags "$@" ... |
||||
$srcdir/configure --enable-maintainer-mode $conf_flags "$@" \ |
@ -1,81 +0,0 @@
@@ -1,81 +0,0 @@
|
||||
dnl Process this file with autoconf to produce a configure script. |
||||
AC_PREREQ([2.54]) |
||||
AC_INIT([Mono.Cxxi], [0.99.1]) |
||||
AM_INIT_AUTOMAKE([foreign]) |
||||
AM_MAINTAINER_MODE |
||||
|
||||
dnl pkg-config |
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
||||
if test "x$PKG_CONFIG" = "xno"; then |
||||
AC_MSG_ERROR([You need to install pkg-config]) |
||||
fi |
||||
|
||||
SHAMROCK_EXPAND_LIBDIR |
||||
SHAMROCK_EXPAND_BINDIR |
||||
SHAMROCK_EXPAND_DATADIR |
||||
|
||||
AC_PROG_INSTALL |
||||
|
||||
AC_PATH_PROG(MONO, mono, no) |
||||
if test "x$MONO" = "xno"; then |
||||
AC_MSG_ERROR([mono Not found]) |
||||
fi |
||||
|
||||
AC_PATH_PROG(GMCS, mcs, no) |
||||
if test "x$GMCS" = "xno"; then |
||||
AC_MSG_ERROR([mcs Not found]) |
||||
fi |
||||
|
||||
AC_PATH_PROG(GCCXML, gccxml, no) |
||||
if test "x$GCCXML" = "xno"; then |
||||
AC_MSG_ERROR([gccxml Not found]) |
||||
fi |
||||
|
||||
AC_ARG_ENABLE(debug, |
||||
AC_HELP_STRING([--enable-debug], |
||||
[Use 'DEBUG' Configuration [default=YES]]), |
||||
enable_debug=yes, enable_debug=no) |
||||
AM_CONDITIONAL(ENABLE_DEBUG, test x$enable_debug = xyes) |
||||
if test "x$enable_debug" = "xyes" ; then |
||||
CONFIG_REQUESTED="yes" |
||||
fi |
||||
AC_ARG_ENABLE(release, |
||||
AC_HELP_STRING([--enable-release], |
||||
[Use 'RELEASE' Configuration [default=NO]]), |
||||
enable_release=yes, enable_release=no) |
||||
AM_CONDITIONAL(ENABLE_RELEASE, test x$enable_release = xyes) |
||||
if test "x$enable_release" = "xyes" ; then |
||||
CONFIG_REQUESTED="yes" |
||||
fi |
||||
if test -z "$CONFIG_REQUESTED" ; then |
||||
AM_CONDITIONAL(ENABLE_DEBUG, true) |
||||
enable_debug=yes |
||||
fi |
||||
|
||||
AC_ARG_ENABLE(examples, |
||||
AC_HELP_STRING([--enable-examples], |
||||
[Build examples [default=NO]]), |
||||
enable_examples=yes, enable_examples=no) |
||||
AM_CONDITIONAL(ENABLE_EXAMPLES, test x$enable_examples = xyes) |
||||
|
||||
dnl package checks, common for all configs |
||||
|
||||
PKG_CHECK_MODULES([MONO_NUNIT], [mono-nunit]) |
||||
|
||||
dnl package checks, per config |
||||
|
||||
|
||||
AC_CONFIG_FILES([ |
||||
src/Mono.Cxxi/mono.cxxi.pc |
||||
src/Mono.Cxxi/Makefile |
||||
src/generator/generator |
||||
src/generator/Makefile |
||||
src/Makefile |
||||
tests/Makefile |
||||
examples/Makefile |
||||
examples/Hello/Makefile |
||||
examples/qt/Makefile |
||||
Makefile |
||||
]) |
||||
|
||||
AC_OUTPUT |
@ -1,50 +0,0 @@
@@ -1,50 +0,0 @@
|
||||
AC_DEFUN([SHAMROCK_EXPAND_LIBDIR], |
||||
[ |
||||
expanded_libdir=`( |
||||
case $prefix in |
||||
NONE) prefix=$ac_default_prefix ;; |
||||
*) ;; |
||||
esac |
||||
case $exec_prefix in |
||||
NONE) exec_prefix=$prefix ;; |
||||
*) ;; |
||||
esac |
||||
eval echo $libdir |
||||
)` |
||||
AC_SUBST(expanded_libdir) |
||||
]) |
||||
|
||||
AC_DEFUN([SHAMROCK_EXPAND_BINDIR], |
||||
[ |
||||
expanded_bindir=`( |
||||
case $prefix in |
||||
NONE) prefix=$ac_default_prefix ;; |
||||
*) ;; |
||||
esac |
||||
case $exec_prefix in |
||||
NONE) exec_prefix=$prefix ;; |
||||
*) ;; |
||||
esac |
||||
eval echo $bindir |
||||
)` |
||||
AC_SUBST(expanded_bindir) |
||||
]) |
||||
|
||||
AC_DEFUN([SHAMROCK_EXPAND_DATADIR], |
||||
[ |
||||
case $prefix in |
||||
NONE) prefix=$ac_default_prefix ;; |
||||
*) ;; |
||||
esac |
||||
|
||||
case $exec_prefix in |
||||
NONE) exec_prefix=$prefix ;; |
||||
*) ;; |
||||
esac |
||||
|
||||
expanded_datadir=`(eval echo $datadir)` |
||||
expanded_datadir=`(eval echo $expanded_datadir)` |
||||
|
||||
AC_SUBST(expanded_datadir) |
||||
]) |
||||
|
@ -1,155 +0,0 @@
@@ -1,155 +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 "$$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 |
Loading…
Reference in new issue