| Revision 508,
925 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 | # Check for the electric fence libraries |
|---|
| 8 | |
|---|
| 9 | AC_DEFUN([__ARM4_EFENCE_CHECKLINK], |
|---|
| 10 | [ |
|---|
| 11 | EFENCE_LIBS="$1" |
|---|
| 12 | ac_save_LIBS="$LIBS" |
|---|
| 13 | LIBS="$LIBS $EFENCE_LIBS" |
|---|
| 14 | AC_LINK_IFELSE([ |
|---|
| 15 | #include <stdlib.h> |
|---|
| 16 | |
|---|
| 17 | main () |
|---|
| 18 | { |
|---|
| 19 | void *mem_ptr; |
|---|
| 20 | |
|---|
| 21 | mem_ptr = malloc (1024); |
|---|
| 22 | } |
|---|
| 23 | ], ,[EFENCE_LIBS=""]) |
|---|
| 24 | LIBS="$ac_save_libs" |
|---|
| 25 | AC_SUBST(EFENCE_LIBS) |
|---|
| 26 | ]) |
|---|
| 27 | |
|---|
| 28 | AC_DEFUN([ARM4_CHECK_EFENCE], |
|---|
| 29 | [ |
|---|
| 30 | AC_ARG_ENABLE(efence, |
|---|
| 31 | [ --enable-efence enable electric fence memory debugging], |
|---|
| 32 | [ |
|---|
| 33 | arm4_efence=no |
|---|
| 34 | __ARM4_EFENCE_CHECKLINK([-lefence]) |
|---|
| 35 | if test "x$EFENCE_LIBS" = "x" ; then |
|---|
| 36 | AC_MSG_ERROR([this platform doesn't support efence]) |
|---|
| 37 | fi |
|---|
| 38 | ],) |
|---|
| 39 | ]) |
|---|
Note: See
TracBrowser
for help on using the repository browser.