aboutsummaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2010-03-11 17:28:41 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2010-10-21 11:34:58 +0200
commit86715242cee9d50ca24a522913d1a6b04e0bcc3d (patch)
tree46d591fc0176c5fc0a305d2dab81566f557dc093 /acinclude.m4
parentOn TARGET_LINUX define _GNU_SOURCE if not defined (diff)
downloadopenvpn-86715242cee9d50ca24a522913d1a6b04e0bcc3d.tar.xz
Fix autotools cross-compiling support
This is a modified version of a patch sent to the sf.net patch tracker: <http://sourceforge.net/tracker/?func=detail&aid=2491190&group_id=48978&atid=454721> 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: <http://thread.gmane.org/gmane.network.openvpn.devel/3176> 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 <dazo@users.sourceforge.net> Acked-by: James Yonan <james@openvpn.net> Acked-by: Alon Bar-Lev <alon.barlev@gmail.com>
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m410
1 files changed, 5 insertions, 5 deletions
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