summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorHib Eris <hib@hiberis.nl>2013-05-11 16:57:39 +0200
committerHib Eris <hib@hiberis.nl>2013-05-13 17:07:46 +0200
commit914099dce1bfaef71754c312b2711989fe30929d (patch)
tree3ad2730bc61d3d90c5d818cbb035874cf8e7238e /m4
parent7d5a90b7b97b4c54827aacf91cdb04c6118c2ef2 (diff)
downloadgtk+-914099dce1bfaef71754c312b2711989fe30929d.tar.gz
Build extract-strings tool for build system
This fixes cross compiling where build system != host system. https://bugzilla.gnome.org/show_bug.cgi?id=699690
Diffstat (limited to 'm4')
-rw-r--r--m4/ax_prog_cc_for_build.m42
-rw-r--r--m4/pkg_config_for_build.m420
2 files changed, 22 insertions, 0 deletions
diff --git a/m4/ax_prog_cc_for_build.m4 b/m4/ax_prog_cc_for_build.m4
index 96cd98ac9b..c2adede872 100644
--- a/m4/ax_prog_cc_for_build.m4
+++ b/m4/ax_prog_cc_for_build.m4
@@ -57,6 +57,7 @@ pushdef([CPP], CPP_FOR_BUILD)dnl
pushdef([CFLAGS], CFLAGS_FOR_BUILD)dnl
pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl
pushdef([LDFLAGS], LDFLAGS_FOR_BUILD)dnl
+pushdef([LIBS], LIBS_FOR_BUILD)dnl
pushdef([host], build)dnl
pushdef([host_alias], build_alias)dnl
pushdef([host_cpu], build_cpu)dnl
@@ -98,6 +99,7 @@ popdef([host_vendor])dnl
popdef([host_cpu])dnl
popdef([host_alias])dnl
popdef([host])dnl
+popdef([LIBS])dnl
popdef([LDFLAGS])dnl
popdef([CPPFLAGS])dnl
popdef([CFLAGS])dnl
diff --git a/m4/pkg_config_for_build.m4 b/m4/pkg_config_for_build.m4
new file mode 100644
index 0000000000..0422f482f2
--- /dev/null
+++ b/m4/pkg_config_for_build.m4
@@ -0,0 +1,20 @@
+# PKG_PROG_PKG_CONFIG_FOR_BUILD([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG_FOR_BUILD],
+[m4_pattern_allow([^PKG_CONFIG_FOR_BUILD$])
+AC_ARG_VAR([PKG_CONFIG_FOR_BUILD], [path to build system's pkg-config utility])
+
+if test "x$ac_cv_env_PKG_CONFIG_FOR_BUILD_set" != "xset"; then
+ AC_PATH_PROG([PKG_CONFIG_FOR_BUILD], [pkg-config])
+fi
+if test -n "$PKG_CONFIG_FOR_BUILD"; then
+ _pkg_for_build_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([build system's pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG_FOR_BUILD --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG_FOR_BUILD=""
+ fi
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG_FOR_BUILD