Skip to content
Newer
Older
100644 62 lines (51 sloc) 1.9 KB
c98254b @novas0x2a relicense everything. woo.
novas0x2a authored
1 dnl __BEGIN_LICENSE__
426c2c3 all: Relicense VW as Apache 2
Zack Moratto authored
2 dnl Copyright (c) 2006-2012, United States Government as represented by the
3 dnl Administrator of the National Aeronautics and Space Administration. All
4 dnl rights reserved.
5 dnl
6 dnl The NASA Vision Workbench is licensed under the Apache License,
7 dnl Version 2.0 (the "License"); you may not use this file except in
8 dnl compliance with the License. You may obtain a copy of the License at
9 dnl http://www.apache.org/licenses/LICENSE-2.0
10 dnl
11 dnl Unless required by applicable law or agreed to in writing, software
12 dnl distributed under the License is distributed on an "AS IS" BASIS,
13 dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 dnl See the License for the specific language governing permissions and
15 dnl limitations under the License.
c98254b @novas0x2a relicense everything. woo.
novas0x2a authored
16 dnl __END_LICENSE__
17
18
f9cc584 @novas0x2a add function-checker, and use it for BigTIFF
novas0x2a authored
19 dnl Usage: AX_CHECK_FUNCTIONS(<function-list>, <libs>, [<if-all-found>, <for-each-not-found>, <checking?>])
20 dnl
21 dnl this is like AC_CHECK_LIB, but with less side effects, and an explicit lib
22 dnl argument. if checking is defined, outputs the checks to user.
23 AC_DEFUN([AX_CHECK_FUNCTIONS],
24 [
25 check_function_LDFLAGS="$LDFLAGS"
26 check_function_LIBS="$LIBS"
27
28 check_function_missing_libs=no
29 check_function_TRY_LIBS="$2"
30
31 LDFLAGS=""
32 LIBS="$check_function_TRY_LIBS"
33
34 for func in $1; do
35 m4_ifval([$5], [AC_MSG_CHECKING([$5])])
6632602 @novas0x2a some fixes to make this work on old autotools
novas0x2a authored
36 echo ["Checking for $func in $LIBS"] >&AS_MESSAGE_LOG_FD
f9cc584 @novas0x2a add function-checker, and use it for BigTIFF
novas0x2a authored
37
38 AC_LINK_IFELSE(
c4bf350 @novas0x2a fix warnings with autoconf 2.68
novas0x2a authored
39 [AC_LANG_CALL([],[$func])],
f9cc584 @novas0x2a add function-checker, and use it for BigTIFF
novas0x2a authored
40 [check_function_got_it=yes],
41 [
42 check_function_missing_libs=yes
43 check_function_got_it=no
44 m4_ifval([$4], [$4], [:])
6632602 @novas0x2a some fixes to make this work on old autotools
novas0x2a authored
45 echo ["Could not find $func in $LIBS"] >&AS_MESSAGE_LOG_FD
46
f9cc584 @novas0x2a add function-checker, and use it for BigTIFF
novas0x2a authored
47 ]
48 )
49
50 m4_ifval([$5], [AC_MSG_RESULT([$check_function_got_it])])
51 done
52
53 m4_ifval([$3], [
93ae5cf @novas0x2a fix bashism that snuck into the scripts
novas0x2a authored
54 if test x"$check_function_missing_libs" = x"no"; then
f9cc584 @novas0x2a add function-checker, and use it for BigTIFF
novas0x2a authored
55 $3
56 fi
57 ])
58
59 LDFLAGS="$check_function_LDFLAGS"
60 LIBS="$check_function_LIBS"
61 ])
Something went wrong with that request. Please try again.