| Revision 508,
799 bytes
checked in by dcarter, 4 years ago
(diff) |
|
Merge 0.7 development branch
|
| Line | |
|---|
| 1 | # Copyright (c) 2005-2008 David Carter <dcarter@arm4.org> and others. |
|---|
| 2 | # All rights reserved. This program and the accompanying materials |
|---|
| 3 | # are made available under the terms of the Eclipse Public License v1.0 |
|---|
| 4 | # which accompanies this distribution, and is available at |
|---|
| 5 | # http://www.eclipse.org/legal/epl-v10.html |
|---|
| 6 | |
|---|
| 7 | # Macros to add the correct flags required for multi-thread safety |
|---|
| 8 | |
|---|
| 9 | AC_DEFUN([ARM4_THREAD_SAFE], |
|---|
| 10 | [ |
|---|
| 11 | AC_REQUIRE([AC_CANONICAL_HOST]) |
|---|
| 12 | AC_MSG_CHECKING(for thread safe flags) |
|---|
| 13 | ac_save_CFLAGS="$CFLAGS" |
|---|
| 14 | flag=none |
|---|
| 15 | case "${host_os}" in |
|---|
| 16 | aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; |
|---|
| 17 | solaris* | osf* | hpux* | linux* | cigwin*) flag="-D_REENTRANT";; |
|---|
| 18 | esac |
|---|
| 19 | AC_MSG_RESULT(${flag}) |
|---|
| 20 | |
|---|
| 21 | if test "x$flag" != xnone; then |
|---|
| 22 | CFLAGS="$CFLAGS $flag" |
|---|
| 23 | fi |
|---|
| 24 | |
|---|
| 25 | AC_SUBST(CFLAGS) |
|---|
| 26 | ]) |
|---|
| 27 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.