Last change
on this file since 6378 was
6164,
checked in by bensch, 19 years ago
|
orxonox/trunk: ac-files for easier checks in the configure.ac
|
File size:
1.2 KB
|
Line | |
---|
1 | dnl AX_CHECK_REQUIRED_HEADER_LIB([HEADER-NAME], [LIBRARY-NAME], [FUNCTION-IN-LIB], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [LIB-WEB-PAGE]) |
---|
2 | AC_DEFUN([AX_CHECK_REQUIRED_HEADER_LIB], [ |
---|
3 | _header_check="" |
---|
4 | _lib_check="" |
---|
5 | |
---|
6 | AC_CHECK_HEADER([$1], [_header_check="yes"], [_header_check="no"]) |
---|
7 | AC_CHECK_LIB([$2], [$3], [_lib_check="yes"], [_lib_check="no"]) |
---|
8 | if [test x$_header_check = "xyes" && test "x$_lib_check" = "xyes"] ; then |
---|
9 | LIBS="$LIBS -l$2" |
---|
10 | $4 |
---|
11 | else |
---|
12 | echo "------------------" |
---|
13 | echo "LIBRARY $2 not found." |
---|
14 | echo "please install the $2-LIBRARY-package which can be found at $6" |
---|
15 | echo "------------------" |
---|
16 | $5 |
---|
17 | exit -1 |
---|
18 | fi |
---|
19 | ]) |
---|
20 | |
---|
21 | |
---|
22 | dnl AX_CHECK_HEADER_LIB([HEADER-NAME], [LIBRARY-NAME], [FUNCTION-IN-LIB], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [LIB-WEB-PAGE]) |
---|
23 | AC_DEFUN([AX_CHECK_HEADER_LIB], [ |
---|
24 | _header_check="" |
---|
25 | _lib_check="" |
---|
26 | |
---|
27 | AC_CHECK_HEADER([$1], [_header_check="yes"], [_header_check="no"]) |
---|
28 | AC_CHECK_LIB([$2], [$3], [_lib_check="yes"], [_lib_check="no"]) |
---|
29 | if [test x$_header_check = "xyes" && test "x$_lib_check" = "xyes"] ; then |
---|
30 | LIBS="$LIBS -l$2" |
---|
31 | $4 |
---|
32 | else |
---|
33 | $5 |
---|
34 | fi |
---|
35 | ]) |
---|
36 | |
---|
Note: See
TracBrowser
for help on using the repository browser.