Debian Codegraph @

aclocal.m4

raw ◀ ▶
1 Debian patch touch this file
1 dnl AC_TRY_RUN_WITH_OUTPUT(VARIABLE, PROGRAM,)
2 AC_DEFUN(AC_TRY_RUN_WITH_OUTPUT,
3 [AC_REQUIRE([AC_PROG_CC])dnl
4 if test "$cross_compiling" = yes; then
5 ifelse([$3], ,
6 [errprint(__file__:__line__: warning: [AC_TRY_RUN_WITH_OUTPUT] called without default to
7 allow cross compiling
8 )dnl
9 AC_MSG_ERROR(can not run test program while cross compiling)],
10 [$3])
11 else
12 cat > conftest.$ac_ext <<EOF
13 [#]line __oline__ "configure"
14 #include "confdefs.h"
•15 AC_LANG_CASE([C++], [#ifdef __cplusplus
16 extern "C" void exit(int);
17 #endif
18 ])dnl
19 [$2]
20 EOF
21 eval $ac_link
22 if test -s conftest && (./conftest > ./conftest.stdout; exit) 2>/dev/null; then
23 $1=`cat ./conftest.stdout`
24 else
25 $1=""
26 fi
27 fi
28 rm -fr conftest*])
29
30 dnl AC_GREP_SYMBOL(VARIABLE, SYMBOL, FILE)
31 AC_DEFUN(AC_GREP_SYMBOL,
32 [AC_REQUIRE([AC_PROG_AWK])dnl
33 cat > conftest.awk <<EOF
34 [/^# *define *]$2[[ \t]]/ { print [\$][3] }
35 EOF
36 $1=`${AWK} -f conftest.awk $3`
37 rm -rf conftest*])
38