Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/acinclude.m4 @ 6911

Last change on this file since 6911 was 6274, checked in by bensch, 19 years ago

orxonox/trunk: better destination of the m4-files (in acinclude.m4)

File size: 1.3 KB
Line 
1
2
3dnl AX_CHECK_HEADER_LIB([HEADER-NAME], [LIBRARY-NAME], [FUNCTION-IN-LIB], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [LIB-WEB-PAGE])
4AC_DEFUN([AX_CHECK_HEADER_LIB], [
5    _header_check=""
6    _lib_check=""
7
8    AC_CHECK_HEADER([$1], [_header_check="yes"], [_header_check="no"])
9    AC_CHECK_LIB([$2], [$3], [_lib_check="yes"], [_lib_check="no"])
10    if [test "x$_header_check" = "xyes" && test "x$_lib_check" = "xyes"] ; then
11         LIBS="$LIBS -l$2"
12         $4
13    else
14         echo "no Support for $2"
15         $5
16    fi
17])
18
19
20
21dnl AX_CHECK_REQUIRED_HEADER_LIB([HEADER-NAME], [LIBRARY-NAME], [FUNCTION-IN-LIB], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [LIB-WEB-PAGE])
22AC_DEFUN([AX_CHECK_REQUIRED_HEADER_LIB], [
23    _header_check=""
24    _lib_check=""
25
26    for _header in $1
27    do
28      AC_CHECK_HEADER([$_header], [_header_check="yes"], [_header_check="no"])
29      if  test "x$_header_check" = "xyes" ; then
30        break
31      fi
32    done
33    AC_CHECK_LIB([$2], [$3], [_lib_check="yes"], [_lib_check="no"])
34    if [test x$_header_check = "xyes" && test "x$_lib_check" = "xyes"] ; then
35         LIBS="$LIBS -l$2"
36         $4
37    else
38         echo "------------------"
39         echo "LIBRARY $2 not found."
40         echo "please install the $2-LIBRARY-package which can be found at $6"
41         echo "------------------"
42         $5
43         exit -1
44    fi
45])
Note: See TracBrowser for help on using the repository browser.