Debian Codegraph @

tools/plotlibs

raw symbols SCIP
1 #!/bin/bash
2
3 X11=$(grep X11 ../config.h | grep '#define' \
4 | grep -v XCB \
5 | awk '{ printf(" %s", $2); }')
6
7 XCB=$(grep XCB ../config.h | grep '#define' \
8 | awk '{ printf(" %s", $2); }')
9 GTK="HAVE_LIBGTK_3 HAVE_LIBCAIRO"
10
11 print_libs()
12 {
13 local missing=""
14 echo "
15 // $1"
16 for have in $2; do
17 if [ "${have:0:4}" = "apl_" ]; then continue; fi
18
19 what="${have:5}"
20 missing="$missing MISSING_$what "
21 case $what in
22 LIBXCB) file="libX11-xcb.so" ;;
23 LIBX11) file="libX11.so" ;;
24 LIBX11_XCB) file="libX11-xcb.so" ;;
25 LIBGTK_3) file="libgtk-3.so" ;;
26 LIBGDK_3) file="libgdk-3.so" ;;
27 LIBCAIRO) file="libcairo.so" ;;
28
29 XCB_XCB_H) file="xcb/xcb.h" ;;
30 X11_XLIB_H) file="X11/Xlib.h" ;;
31 X11_XLIB_XCB_H) file="X11/Xlib-xcb.h" ;;
32 X11_XUTIL_H) file="X11/Xutil.h" ;;
33 *) file="??? $what ???"
34 esac
35 echo -n "
36 #if $have
37 # define MISSING_$what \"\"
38 #else // not $have
39 # define MISSING_$what \" $file\"
40 #endif // (don't) $have
41 "
42 done
43 echo -n "
44 // $1 summary
45 "
46
47 echo -n "#define MISSING_$1"
48
49 for what in $missing; do
50 echo " \\"
51 echo -n " $what"
52 done
53 echo
54 }
55
56 print_libs X11 "$X11"
57 print_libs XCB "$XCB"
58 print_libs GTK "$GTK"
59
60 echo "
61 configure.ac:
62
63 X11 $X11
64 XCB $XCB
65 GTK $GTK
66 "