SUBDIRS = include/libfirm ir
-EXTRA_DIST = README COPYING NEWS acinclude.m4
+EXTRA_DIST = README COPYING NEWS m4/pkg.m4 m4/ax_cflags_gcc_option.m4
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libfirm.pc
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
+
+ACLOCAL_AMFLAGS = -I m4
+++ /dev/null
-# 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
-])],
- [$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
-
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_cflags_gcc_option.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_CFLAGS_GCC_OPTION (optionflag [,[shellvar][,[A][,[NA]]])
-#
-# DESCRIPTION
-#
-# AX_CFLAGS_GCC_OPTION(-fvomit-frame) would show a message as like
-# "checking CFLAGS for gcc -fvomit-frame ... yes" and adds the optionflag
-# to CFLAGS if it is understood. You can override the shellvar-default of
-# CFLAGS of course. The order of arguments stems from the explicit macros
-# like AX_CFLAGS_WARN_ALL.
-#
-# The cousin AX_CXXFLAGS_GCC_OPTION would check for an option to add to
-# CXXFLAGS - and it uses the autoconf setup for C++ instead of C (since it
-# is possible to use different compilers for C and C++).
-#
-# The macro is a lot simpler than any special AX_CFLAGS_* macro (or
-# ax_cxx_rtti.m4 macro) but allows to check for arbitrary options.
-# However, if you use this macro in a few places, it would be great if you
-# would make up a new function-macro and submit it to the ac-archive.
-#
-# - $1 option-to-check-for : required ("-option" as non-value)
-# - $2 shell-variable-to-add-to : CFLAGS (or CXXFLAGS in the other case)
-# - $3 action-if-found : add value to shellvariable
-# - $4 action-if-not-found : nothing
-#
-# Note: in earlier versions, $1-$2 were swapped. We try to detect the
-# situation and accept a $2=~/-/ as being the old option-to-check-for.
-#
-# There are other variants that emerged from the original macro variant
-# which did just test an option to be possibly added. However, some
-# compilers accept an option silently, or possibly for just another option
-# that was not intended. Therefore, we have to do a generic test for a
-# compiler family. For gcc we check "-pedantic" being accepted which is
-# also understood by compilers who just want to be compatible with gcc
-# even when not being made from gcc sources.
-#
-# See also: AX_CFLAGS_SUN_OPTION, AX_CFLAGS_HPUX_OPTION,
-# AX_CFLAGS_AIX_OPTION, and AX_CFLAGS_IRIX_OPTION.
-#
-# LICENSE
-#
-# Copyright (c) 2008 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, 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.
-
-AC_DEFUN([AX_CFLAGS_GCC_OPTION_OLD], [dnl
-AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ax_cv_cflags_gcc_option_$2])dnl
-AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
-VAR,[VAR="no, unknown"
- AC_LANG_SAVE
- AC_LANG_C
- ac_save_[]FLAGS="$[]FLAGS"
-for ac_arg dnl
-in "-pedantic -Werror % m4_ifval($2,$2,-option)" dnl GCC
- "-pedantic % m4_ifval($2,$2,-option) %% no, obsolete" dnl new GCC
- #
-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_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_GCC_OPTION_OLD], [dnl
-AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ax_cv_cxxflags_gcc_option_$2])dnl
-AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
-VAR,[VAR="no, unknown"
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- ac_save_[]FLAGS="$[]FLAGS"
-for ac_arg dnl
-in "-pedantic -Werror % m4_ifval($2,$2,-option)" dnl GCC
- "-pedantic % m4_ifval($2,$2,-option) %% no, obsolete" dnl new GCC
- #
-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_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 -------------------------------------------------------------------------
-
-AC_DEFUN([AX_CFLAGS_GCC_OPTION_NEW], [dnl
-AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ax_cv_cflags_gcc_option_$1])dnl
-AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
-VAR,[VAR="no, unknown"
- AC_LANG_SAVE
- AC_LANG_C
- ac_save_[]FLAGS="$[]FLAGS"
-for ac_arg dnl
-in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC
- "-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC
- #
-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_ifvaln($3,$3,[
- if echo " $[]m4_ifval($2,$2,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
- then AC_RUN_LOG([: m4_ifval($2,$2,FLAGS) does contain $VAR])
- else AC_RUN_LOG([: m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"])
- m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,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_GCC_OPTION_NEW], [dnl
-AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ax_cv_cxxflags_gcc_option_$1])dnl
-AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
-VAR,[VAR="no, unknown"
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- ac_save_[]FLAGS="$[]FLAGS"
-for ac_arg dnl
-in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC
- "-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC
- #
-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_ifvaln($3,$3,[
- if echo " $[]m4_ifval($2,$2,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
- then AC_RUN_LOG([: m4_ifval($2,$2,FLAGS) does contain $VAR])
- else AC_RUN_LOG([: m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"])
- m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"
- fi ]) ;;
-esac
-AS_VAR_POPDEF([VAR])dnl
-AS_VAR_POPDEF([FLAGS])dnl
-])
-
-AC_DEFUN([AX_CFLAGS_GCC_OPTION],[ifelse(m4_bregexp([$2],[-]),-1,
-[AX_CFLAGS_GCC_OPTION_NEW($@)],[AX_CFLAGS_GCC_OPTION_OLD($@)])])
-
-AC_DEFUN([AX_CXXFLAGS_GCC_OPTION],[ifelse(m4_bregexp([$2],[-]),-1,
-[AX_CXXFLAGS_GCC_OPTION_NEW($@)],[AX_CXXFLAGS_GCC_OPTION_OLD($@)])])
AC_INIT([libfirm], [firm_version], [firm@ipd.info.uni-karlsruhe.de])
AC_CONFIG_SRCDIR([ir/common/firm.c])
-AM_INIT_AUTOMAKE([foreign dist-bzip2 1.9])
+AM_INIT_AUTOMAKE([foreign dist-bzip2 silent-rules 1.11])
+
+AM_SILENT_RULES([yes])
AC_DEFINE([libfirm_VERSION_MAJOR], [firm_major_version], [Firms major version number])
AC_DEFINE([libfirm_VERSION_MINOR], [firm_minor_version], [Firms minor version number])
AC_DEFINE([FIRM_BUILD], [], [Defined when firm library is built])
AC_DEFINE([FIRM_DLL], [], [Define when a dynamically loadable shared library is built])
+AC_CONFIG_MACRO_DIR([m4])
+
dnl Package options
dnl ===============
fi
AC_SUBST([enable_assert])
-dnl enable ILP solver support
-dnl --------------------------------
-AC_ARG_ENABLE([ilp],
-[AS_HELP_STRING([--enable-ilp], [enable ilp solver])],
-[enable_ilp="$enableval"], [enable_ilp="no"])
-
-if test "$enable_ilp" = yes; then
- AC_DEFINE([WITH_ILP], [], [enable to build code using ilp solvers])
-fi
-
-dnl disable backend
-dnl ---------------
-AC_ARG_ENABLE([backend],
-[AS_HELP_STRING([--disable-backend], [disable backends])],
-[enable_backend="$enableval"], [enable_backend="yes"])
-
-AC_SUBST(enable_backend)
-
dnl Checks for programs.
dnl ====================
libfirm.pc
])
-BACKENDS=""
-if test "$enable_backend" = yes; then
- BACKENDS="arm ia32 sparc amd64"
-fi
-AC_SUBST([BACKENDS])
-
AC_OUTPUT
-
-dnl output summary of firm configuration
-echo ""
-echo "firm configuration summary:"
-echo " backends $BACKENDS"
-echo " profiling $enable_profile_libfirm"
-echo " debug/verifiers $enable_debug_libfirm"
-echo " assertions $enable_assert"
-echo " ilp $enable_ilp"
-echo ""
libfirmincludedir=$(includedir)/libfirm
libfirminclude_HEADERS = \
analyze_irg_args.h \
- be.h \
begin.h \
+ be.h \
callgraph.h \
cdep.h \
cgana.h \
firm.h \
firmstat.h \
firm_types.h \
- height.h \
+ heights.h \
ident.h \
interval_analysis.h \
irarch.h \
- ircgcons.h \
ircgopt.h \
irconsconfirm.h \
ircons.h \
irpass.h \
irprintf.h \
irprog.h \
- irsimpletype.h \
irtypeinfo.h \
irverify.h \
lowering.h \
+ nodeops.h \
+ opcodes.h \
rta.h \
- seqnumbers.h \
structure.h \
timing.h \
trouts.h \
-I$(top_srcdir)/ir/debug \
-I$(top_srcdir)/ir/ident \
-I$(top_srcdir)/ir/ir \
+ -I$(top_srcdir)/ir/kaps \
-I$(top_srcdir)/ir/libcore \
-I$(top_srcdir)/ir/lower \
-I$(top_srcdir)/ir/net \
ana/dfs.c \
ana/execfreq.c \
ana/execution_frequency.c \
- ana/field_temperature.c \
- ana/height.c \
+ ana/heights.c \
ana/interval_analysis.c \
ana/irbackedge.c \
ana/ircfscc.c \
ana/irmemory.c \
ana/irouts.c \
ana/irscc.c \
- ana/irsimpletype.c \
ana/irtypeinfo.c \
ana/rta.c \
ana/structure.c \
ana/trouts.c \
ana/vrp.c \
be/beabi.c \
+ be/beabihelper.c \
be/bearch.c \
be/beblocksched.c \
be/bechordal.c \
be/becopyheur2.c \
be/becopyheur4.c \
be/becopyheur.c \
- be/becopyilp1.c \
be/becopyilp2.c \
be/becopyilp.c \
be/becopyopt.c \
- be/becopypbqp.c \
be/becopystat.c \
be/bedbgout.c \
be/bedomfront.c \
- be/bedump_minir.c \
be/beemitter_binary.c \
be/beemitter.c \
be/beflags.c \
be/begnuas.c \
be/beifg.c \
- be/beilpsched.c \
be/beinfo.c \
be/beinsn.c \
be/beirg.c \
be/bepbqpcoloring.c \
be/bepeephole.c \
be/beprefalloc.c \
- be/bepressurestat.c \
be/bera.c \
be/besched.c \
- be/beschedmris.c \
be/beschednormal.c \
be/beschedrand.c \
be/beschedregpress.c \
- be/beschedrss.c \
be/beschedtrace.c \
be/beschedtrivial.c \
- be/bespillbelady2.c \
- be/bespillbelady3.c \
be/bespillbelady.c \
be/bespill.c \
be/bespilldaemel.c \
be/bessaconstr.c \
be/bessadestr.c \
be/bestabs.c \
+ be/bestack.c \
be/bestat.c \
be/bestate.c \
be/betranshlp.c \
common/timing.c \
debug/dbginfo.c \
debug/debugger.c \
- debug/seqnumbers.c \
ident/ident.c \
ident/mangle.c \
ir/instrument.c \
ir/irarch.c \
ir/irargs.c \
- ir/ircgcons.c \
ir/ircons.c \
ir/irdump.c \
ir/irdumptxt.c \
ir/irprofile.c \
ir/irprog.c \
ir/irssacons.c \
- ir/irvrfy.c \
+ ir/irverify.c \
ir/valueset.c \
libcore/lc_appendable.c \
- libcore/lc_config_lexer.c \
- libcore/lc_config_parser.c \
libcore/lc_opts.c \
libcore/lc_opts_enum.c \
libcore/lc_printf.c \
stat/pattern_dmp.c \
stat/stat_dmp.c \
stat/statev.c \
- stat/stat_liveness.c \
stat/stat_timing.c \
tr/compound_path.c \
tr/entity.c \
tr/tpop.c \
tr/tr_inheritance.c \
- tr/trvrfy.c \
+ tr/trverify.c \
tr/type.c \
tr/type_finalization.c \
tr/typewalk.c \
tv/fltcalc.c \
tv/strcalc.c \
- tv/tv.c
+ tv/tv.c \
+ kaps/brute_force.c \
+ kaps/bucket.c \
+ kaps/heuristical.c \
+ kaps/heuristical_co.c \
+ kaps/heuristical_co_ld.c \
+ kaps/html_dumper.c \
+ kaps/kaps.c \
+ kaps/matrix.c \
+ kaps/optimal.c \
+ kaps/pbqp_edge.c \
+ kaps/pbqp_node.c \
+ kaps/vector.c
EXTRA_DIST = \
adt/array_t.h \
be/be_t.h \
be/be_types.h \
be/beabi.h \
+ be/beabihelper.h \
be/bearch.h \
be/beblocksched.h \
be/bechordal.h \
be/becopyilp_t.h \
be/becopyopt.h \
be/becopyopt_t.h \
- be/becopypbqp.h \
be/becopystat.h \
be/bedomfront.h \
- be/bedump_minir.h \
be/beemitter.h \
be/beemitter_binary.h \
be/beflags.h \
be/begnuas.h \
be/beifg.h \
- be/beilpsched.h \
be/beinfo.h \
be/beinsn_t.h \
be/beintlive_t.h \
be/beloopana.h \
be/belower.h \
be/bemachine.h \
- be/benode.h \
be/bemodule.h \
be/bemodule_t.h \
- be/besched.h \
+ be/benode.h \
be/bepbqpcoloring.h \
be/bepeephole.h \
- be/bepressurestat.h \
be/bera.h \
- be/beschedmris.h \
- be/beutil.h \
- be/beschedrss.h \
+ be/besched.h \
be/bespill.h \
be/bespillslots.h \
be/bespillutil.h \
be/bessaconstr.h \
be/bessadestr.h \
+ be/bestack.h \
be/bestat.h \
be/bestate.h \
be/bestatevent.h \
be/betranshlp.h \
be/beuses.h \
+ be/beutil.h \
be/beverify.h \
common/debug.h \
common/error.h \
ir/irflag_t.def \
ir/irflag_t.h \
ir/irgraph_t.h \
- ir/irlinkednodemap.h \
- ir/irlinkednodeset.h \
ir/irmode_t.h \
ir/irnode_t.h \
- ir/irnodemap.h \
- ir/irnodeset.h \
ir/irop_t.h \
ir/iropt_t.h \
- ir/irpass_t.h \
- ir/irphase.h \
ir/irphase_t.h \
ir/irprintf_t.h \
- ir/irprofile.h \
ir/irprog_t.h \
+ ir/irlinkednodemap.h \
+ ir/irlinkednodeset.h \
+ ir/irnodemap.h \
+ ir/irnodeset.h \
+ ir/irpass_t.h \
+ ir/irphase.h \
+ ir/irprofile.h \
ir/irtypes.h \
- ir/irvrfy_t.h \
+ ir/irverify_t.h \
ir/valueset.h \
ir/gen_irnode.h \
- libcore/do_bisonflex.sh \
libcore/lc_appendable.h \
libcore/lc_common_t.h \
libcore/lc_config.h \
- libcore/lc_config_lexer.l \
- libcore/lc_config_parser.h \
- libcore/lc_config_parser.y \
- libcore/lc_defines.h \
libcore/lc_opts.h \
+ libcore/lc_defines.h \
libcore/lc_opts_enum.h \
libcore/lc_opts_t.h \
- libcore/lc_parser_t.h \
libcore/lc_printf.h \
libcore/lc_printf_arg_types.def \
- opt/iropt_dbg.h \
- opt/opt_confirms.h \
- opt/opt_init.h \
opt/opt_polymorphy.h \
opt/reassoc_t.h \
opt/scalar_replace.h \
+ opt/iropt_dbg.h \
+ opt/opt_init.h \
stat/counter.h \
stat/dags.h \
stat/firmstat_t.h \
tv/fltcalc.h \
tv/strcalc.h \
tv/tv_t.h \
+ kaps/brute_force.h \
+ kaps/bucket.h \
+ kaps/bucket_t.h \
+ kaps/heuristical.h \
+ kaps/heuristical_co.h \
+ kaps/heuristical_co_ld.h \
+ kaps/html_dumper.h \
+ kaps/kaps.h \
+ kaps/matrix.h \
+ kaps/matrix_t.h \
+ kaps/optimal.h \
+ kaps/pbqp_edge.h \
+ kaps/pbqp_edge_t.h \
+ kaps/pbqp_node.h \
+ kaps/pbqp_node_t.h \
+ kaps/pbqp_t.h \
+ kaps/vector.h \
+ kaps/vector_t.h \
ir/gen_ir_cons.c.inl \
ir/gen_irnode.c.inl \
ir/gen_irop.c.inl \
be/scripts/generate_regalloc_if.pl
# ia32 backend
-
ia32_sources = \
be/ia32/bearch_ia32.c \
be/ia32/ia32_address_mode.c \
be/ia32/ia32_finish.c \
be/ia32/ia32_fpu.c \
be/ia32/ia32_intrinsics.c \
- be/ia32/ia32_map_regs.c \
be/ia32/ia32_new_nodes.c \
be/ia32/ia32_optimize.c \
be/ia32/ia32_transform.c \
- be/ia32/ia32_util.c \
be/ia32/ia32_x87.c
ia32_built_sources = \
be/ia32/ia32_emitter.h \
be/ia32/ia32_finish.h \
be/ia32/ia32_fpu.h \
- be/ia32/ia32_map_regs.h \
be/ia32/ia32_new_nodes.h \
be/ia32/ia32_nodes_attr.h \
be/ia32/ia32_optimize.h \
be/ia32/ia32_spec.pl \
be/ia32/ia32_transform.h \
- be/ia32/ia32_util.h \
be/ia32/ia32_x87.h
$(srcdir)/be/ia32/gen_ia32_new_nodes.c.inl $(srcdir)/be/ia32/gen_ia32_new_nodes.h: \
arm_sources = \
be/arm/arm_emitter.c \
- be/arm/arm_map_regs.c \
be/arm/arm_new_nodes.c \
be/arm/arm_optimize.c \
be/arm/arm_transform.c \
+ be/arm/arm_map_regs.c \
+ be/arm/arm_cconv.c \
be/arm/bearch_arm.c
arm_built_sources = \
be/arm/gen_arm_emitter.c \
EXTRA_DIST += \
be/arm/arm_emitter.h \
- be/arm/arm_map_regs.h \
be/arm/arm_new_nodes.h \
be/arm/arm_nodes_attr.h \
be/arm/arm_optimize.h \
be/arm/arm_spec.pl \
be/arm/arm_transform.h \
- be/arm/bearch_arm.h \
+ be/arm/arm_map_regs.h \
+ be/arm/arm_cconv.h \
be/arm/bearch_arm_t.h
$(srcdir)/be/arm/gen_arm_new_nodes.c.inl $(srcdir)/be/arm/gen_arm_new_nodes.h: \
sparc_sources = \
be/sparc/sparc_emitter.c \
- be/sparc/sparc_map_regs.c \
be/sparc/sparc_new_nodes.c \
be/sparc/sparc_transform.c \
+ be/sparc/sparc_cconv.c \
+ be/sparc/sparc_finish.c \
be/sparc/bearch_sparc.c
sparc_built_sources = \
be/sparc/gen_sparc_emitter.c \
EXTRA_DIST += \
be/sparc/sparc_emitter.h \
- be/sparc/sparc_map_regs.h \
be/sparc/sparc_new_nodes.h \
be/sparc/sparc_nodes_attr.h \
be/sparc/sparc_spec.pl \
+ be/sparc/sparc_cconv.h \
be/sparc/sparc_transform.h \
- be/sparc/bearch_sparc.h \
be/sparc/bearch_sparc_t.h
$(srcdir)/be/sparc/gen_sparc_new_nodes.c.inl $(srcdir)/be/sparc/gen_sparc_new_nodes.h: \
# Little helper script used to create the file list for Makefile.am
# automatically
-DIRS="adt ana be common debug ident ir libcore lower obstack opt stat tr tv"
+DIRS="adt ana be common debug ident ir libcore lower obstack opt stat tr tv kaps"
echo "libfirm_la_SOURCES = \\" > FILELIST
for dir in $DIRS; do
--- /dev/null
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_cflags_gcc_option.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CFLAGS_GCC_OPTION (optionflag [,[shellvar][,[A][,[NA]]])
+#
+# DESCRIPTION
+#
+# AX_CFLAGS_GCC_OPTION(-fomit-frame-pointer) would show a message like
+# "checking CFLAGS for gcc -fomit-frame-pointer ... yes" and add the
+# optionflag to CFLAGS if it is understood. You can override the
+# shellvar-default of CFLAGS of course. The order of arguments stems from
+# the explicit macros like AX_CFLAGS_WARN_ALL.
+#
+# The cousin AX_CXXFLAGS_GCC_OPTION would check for an option to add to
+# CXXFLAGS - and it uses the autoconf setup for C++ instead of C (since it
+# is possible to use different compilers for C and C++).
+#
+# The macro is a lot simpler than any special AX_CFLAGS_* macro (or
+# ax_cxx_rtti.m4 macro) but allows to check for arbitrary options.
+# However, if you use this macro in a few places, it would be great if you
+# would make up a new function-macro and submit it to the ac-archive.
+#
+# - $1 option-to-check-for : required ("-option" as non-value)
+# - $2 shell-variable-to-add-to : CFLAGS (or CXXFLAGS in the other case)
+# - $3 action-if-found : add value to shellvariable
+# - $4 action-if-not-found : nothing
+#
+# Note: in earlier versions, $1-$2 were swapped. We try to detect the
+# situation and accept a $2=~/-/ as being the old option-to-check-for.
+#
+# There are other variants that emerged from the original macro variant
+# which did just test an option to be possibly added. However, some
+# compilers accept an option silently, or possibly for just another option
+# that was not intended. Therefore, we have to do a generic test for a
+# compiler family. For gcc we check "-pedantic" being accepted which is
+# also understood by compilers who just want to be compatible with gcc
+# even when not being made from gcc sources.
+#
+# See also: AX_CFLAGS_SUN_OPTION, AX_CFLAGS_HPUX_OPTION,
+# AX_CFLAGS_AIX_OPTION, and AX_CFLAGS_IRIX_OPTION.
+#
+# LICENSE
+#
+# Copyright (c) 2008 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 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 13
+
+AC_DEFUN([AX_CFLAGS_GCC_OPTION_OLD], [dnl
+AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ax_cv_cflags_gcc_option_$2])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
+VAR,[AS_VAR_SET([VAR],["no, unknown"])
+ AC_LANG_SAVE
+ AC_LANG_C
+ ac_save_[]FLAGS="$[]FLAGS"
+for ac_arg dnl
+in "-pedantic -Werror % m4_ifval($2,$2,-option)" dnl GCC
+ "-pedantic % m4_ifval($2,$2,-option) %% no, obsolete" dnl new GCC
+ #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+ AC_TRY_COMPILE([],[return 0;],
+ [AS_VAR_SET([VAR],[`echo $ac_arg | sed -e 's,.*% *,,'`]); break])
+done
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_RESTORE
+])
+m4_ifdef([AS_VAR_COPY],[AS_VAR_COPY([var],[VAR])],[var=AS_VAR_GET([VAR])])
+case ".$var" in
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
+ .|.no|.no,*) m4_ifvaln($4,$4) ;;
+ *) 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_GCC_OPTION_OLD], [dnl
+AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ax_cv_cxxflags_gcc_option_$2])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
+VAR,[AS_VAR_SET([VAR],["no, unknown"])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_[]FLAGS="$[]FLAGS"
+for ac_arg dnl
+in "-pedantic -Werror % m4_ifval($2,$2,-option)" dnl GCC
+ "-pedantic % m4_ifval($2,$2,-option) %% no, obsolete" dnl new GCC
+ #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+ AC_TRY_COMPILE([],[return 0;],
+ [AS_VAR_SET([VAR],[`echo $ac_arg | sed -e 's,.*% *,,'`]); break])
+done
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_RESTORE
+])
+m4_ifdef([AS_VAR_COPY],[AS_VAR_COPY([var],[VAR])],[var=AS_VAR_GET([VAR])])
+case ".$var" in
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
+ .|.no|.no,*) m4_ifvaln($4,$4) ;;
+ *) 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 -------------------------------------------------------------------------
+
+AC_DEFUN([AX_CFLAGS_GCC_OPTION_NEW], [dnl
+AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ax_cv_cflags_gcc_option_$1])dnl
+AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
+VAR,[AS_VAR_SET([VAR],["no, unknown"])
+ AC_LANG_SAVE
+ AC_LANG_C
+ ac_save_[]FLAGS="$[]FLAGS"
+for ac_arg dnl
+in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC
+ "-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC
+ #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+ AC_TRY_COMPILE([],[return 0;],
+ [AS_VAR_SET([VAR],[`echo $ac_arg | sed -e 's,.*% *,,'`]); break])
+done
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_RESTORE
+])
+m4_ifdef([AS_VAR_COPY],[AS_VAR_COPY([var],[VAR])],[var=AS_VAR_GET([VAR])])
+case ".$var" in
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
+ .|.no|.no,*) m4_ifvaln($4,$4) ;;
+ *) m4_ifvaln($3,$3,[
+ if echo " $[]m4_ifval($2,$2,FLAGS) " | grep " $var " 2>&1 >/dev/null
+ then AC_RUN_LOG([: m4_ifval($2,$2,FLAGS) does contain $var])
+ else AC_RUN_LOG([: m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $var"])
+ m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,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_GCC_OPTION_NEW], [dnl
+AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ax_cv_cxxflags_gcc_option_$1])dnl
+AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
+VAR,[AS_VAR_SET([VAR],["no, unknown"])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_[]FLAGS="$[]FLAGS"
+for ac_arg dnl
+in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC
+ "-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC
+ #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+ AC_TRY_COMPILE([],[return 0;],
+ [AS_VAR_SET([VAR],[`echo $ac_arg | sed -e 's,.*% *,,'`]); break])
+done
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_RESTORE
+])
+m4_ifdef([AS_VAR_COPY],[AS_VAR_COPY([var],[VAR])],[var=AS_VAR_GET([VAR])])
+case ".$var" in
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
+ .|.no|.no,*) m4_ifvaln($4,$4) ;;
+ *) m4_ifvaln($3,$3,[
+ if echo " $[]m4_ifval($2,$2,FLAGS) " | grep " $var " 2>&1 >/dev/null
+ then AC_RUN_LOG([: m4_ifval($2,$2,FLAGS) does contain $var])
+ else AC_RUN_LOG([: m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $var"])
+ m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $var"
+ fi ]) ;;
+esac
+AS_VAR_POPDEF([VAR])dnl
+AS_VAR_POPDEF([FLAGS])dnl
+])
+
+AC_DEFUN([AX_CFLAGS_GCC_OPTION],[ifelse(m4_bregexp([$2],[-]),-1,
+[AX_CFLAGS_GCC_OPTION_NEW($@)],[AX_CFLAGS_GCC_OPTION_OLD($@)])])
+
+AC_DEFUN([AX_CXXFLAGS_GCC_OPTION],[ifelse(m4_bregexp([$2],[-]),-1,
+[AX_CXXFLAGS_GCC_OPTION_NEW($@)],[AX_CXXFLAGS_GCC_OPTION_OLD($@)])])
--- /dev/null
+# 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
+])],
+ [$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