Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/m4/ax_check_required_header_lib.m4 @ 6271

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

orxonox/trunk: MUCH better configure-checks

File size: 819 bytes
Line 
1dnl AX_CHECK_REQUIRED_HEADER_LIB([HEADER-NAME], [LIBRARY-NAME], [FUNCTION-IN-LIB], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [LIB-WEB-PAGE])
2AC_DEFUN([AX_CHECK_REQUIRED_HEADER_LIB], [
3    _header_check=""
4    _lib_check=""
5
6    for _header in $1
7    do
8      AC_CHECK_HEADER([$_header], [_header_check="yes"], [_header_check="no"])
9      if  test "x$_header_check" = "xyes" ; then
10        break
11      fi
12    done
13    AC_CHECK_LIB([$2], [$3], [_lib_check="yes"], [_lib_check="no"])
14    if [test x$_header_check = "xyes" && test "x$_lib_check" = "xyes"] ; then
15         LIBS="$LIBS -l$2"
16         $4
17    else
18         echo "------------------"
19         echo "LIBRARY $2 not found."
20         echo "please install the $2-LIBRARY-package which can be found at $6"
21         echo "------------------"
22         $5
23         exit -1
24    fi
25])
Note: See TracBrowser for help on using the repository browser.