From 64f3c5b0c7fdea3524914025a96b59eb835ea980 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Thu, 11 Mar 2010 17:28:41 +0100 Subject: Fix autotools cross-compiling support This is a modified version of a patch sent to the sf.net patch tracker: After having disucssed this patch on IRC (#openvpn-discussions) March 4, 2010, it was decided to accept this patch when not modifying TARGET_* defines through out the code. Further, in a mail comment Alon Bar-Lev had some other comments of what would be needed to be done. Mail reference: This patch has been tested by bootstrapping the code on a RHEL4.6 box. with the following autotools packages installed: autoconf-2.59-5 automake-1.9.2-3 libtool-1.5.6-4.EL4.2 It builds cleanly and 'make check' passes. Signed-off-by: David Sommerseth Acked-by: James Yonan Acked-by: Alon Bar-Lev --- acinclude.m4 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index f099de5..2d49020 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -224,8 +224,8 @@ acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -m # pthread: Linux, etcetera # --thread-safe: KAI C++ -case "$target" in - *solaris*) +case "$host" in + *-*-solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based @@ -321,9 +321,9 @@ if test "x$acx_pthread_ok" = xyes; then AC_MSG_CHECKING([if more special flags are required for pthreads]) flag=no - case "$target" in - *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; - *solaris* | alpha*-osf* | *linux*) flag="-D_REENTRANT";; + case "$host" in + *-*-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; + *-*-solaris* | alpha*-osf* | *linux*) flag="-D_REENTRANT";; esac AC_MSG_RESULT(${flag}) if test "x$flag" != xno; then -- cgit v1.2.3