Patch: fix cross-compiling (change AC_PATH_PROG to AC_CHECK_TOOL)
Thomas Anderson sent me the attached one line patch to configure.in. I don't know much about autoconf. Would someone be able to review, test and merge this please? (or at least comment on whether it's a good idea.)
In particular, does this require a more recent version of auto-conf than we currently depend on?
Thanks,
Ross
-------- Forwarded Message --------
Subject: [PATCH] Fix cross compiling
Date: Mon, 08 Jun 2015 21:05:32 -0700
From: Thomas Anderson
Hi,
Using AC_PATH_PROG for elements of the toolchain(of which `ar` is
one) will break attempts to cross-compile. This patch fixes that by
using the AC_CHECK_TOOL which uses the --build,--host,--target options
to configure as prefixes to the tool.
Best,
Thomas
Index: configure.in
===================================================================
--- configure.in (revision 1954)
+++ configure.in (working copy)
@@ -105,7 +105,7 @@
AC_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_LN_S
-AC_PATH_PROG(AR, ar, no)
+AC_CHECK_TOOL(AR, ar, no)
if [[ $AR = "no" ]] ; then
AC_MSG_ERROR("Could not find ar - needed to create a library")
fi
portaudio-fix-cross-compiling.patch
Index: configure.in
===================================================================
--- configure.in (revision 1954)
+++ configure.in (working copy)
@@ -105,7 +105,7 @@
AC_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_LN_S
-AC_PATH_PROG(AR, ar, no)
+AC_CHECK_TOOL(AR, ar, no)
if [[ $AR = "no" ]] ; then
AC_MSG_ERROR("Could not find ar - needed to create a library")
fi
_______________________________________________
Portaudio mailing list
Portaudio@music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
In particular, does this require a more recent version of auto-conf than we currently depend on?
Thanks,
Ross
-------- Forwarded Message --------
Subject: [PATCH] Fix cross compiling
Date: Mon, 08 Jun 2015 21:05:32 -0700
From: Thomas Anderson
Hi,
Using AC_PATH_PROG for elements of the toolchain(of which `ar` is
one) will break attempts to cross-compile. This patch fixes that by
using the AC_CHECK_TOOL which uses the --build,--host,--target options
to configure as prefixes to the tool.
Best,
Thomas
Index: configure.in
===================================================================
--- configure.in (revision 1954)
+++ configure.in (working copy)
@@ -105,7 +105,7 @@
AC_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_LN_S
-AC_PATH_PROG(AR, ar, no)
+AC_CHECK_TOOL(AR, ar, no)
if [[ $AR = "no" ]] ; then
AC_MSG_ERROR("Could not find ar - needed to create a library")
fi
portaudio-fix-cross-compiling.patch
Index: configure.in
===================================================================
--- configure.in (revision 1954)
+++ configure.in (working copy)
@@ -105,7 +105,7 @@
AC_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_LN_S
-AC_PATH_PROG(AR, ar, no)
+AC_CHECK_TOOL(AR, ar, no)
if [[ $AR = "no" ]] ; then
AC_MSG_ERROR("Could not find ar - needed to create a library")
fi
_______________________________________________
Portaudio mailing list
Portaudio@music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Leave a comment
Needed for cross-compilation builds that use --host parameter. See:
https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Generic-Programs.html
https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Generic-Programs.html