3 rm -f config.build-subdirs
5 . $srcdir/GUILE-VERSION
7 all_subdirs=`cat $srcdir/*/PLUGIN/REQ $srcdir/*/PLUGIN/OPT /dev/null | tsort | xargs echo`
8 req_subdirs=`cat $srcdir/*/PLUGIN/REQ /dev/null | tsort | xargs echo`
9 opt_subdirs=`cat $srcdir/*/PLUGIN/OPT /dev/null | tsort | xargs echo`
11 AC_CONFIG_SUBDIRS($all_subdirs)
13 for d in $all_subdirs; do
14 if test -d $srcdir/$d ; then
15 existingdirs="$existingdirs $d"
16 if test "x$verbose" = xyes; then
17 if test -f $srcdir/$d/PLUGIN/greet ; then
18 cat $srcdir/$d/PLUGIN/greet
21 echo === Configuring plug-in component $d
28 for d in $req_subdirs; do
29 if test ! -d $srcdir/$d ; then
33 echo "**=*=**" ERROR: Missing required package: $d
41 if test "x$verbose" = xyes; then
42 for d in $opt_subdirs; do
43 if test ! -d $srcdir/$d ; then
46 echo "*=*=*" WARNING: Missing suggested package: $d
56 ### build_subdirs is the list of directories we actually want to
57 ### build. It's not equivalent to existingdirs: if we can't find the
58 ### Tcl libraries, then we don't want to build in gtcltk-lib.
60 ### So why can't we just forget about gtcltk-lib altogether, and
61 ### delete it from existingdirs, in that case? Well, in order for
62 ### 'make dist' to work, we still need to configure gtcltk-lib, and
63 ### the top-level Makefile needs to know it exists,
64 build_subdirs="${existingdirs}"
66 ### Decide which directories to build; remove the ones we don't want
67 ### from build_subdirs.
69 ### On some systems, the Tcl library contains references to
70 ### functions in the dynamic linker library, -ldl, so we may need
72 AC_CHECK_LIB(dl, dlopen)
74 ### Use gtcltk-lib only if we seem to have Tcl installed on the
75 ### system. We really should check for Tk as well, but that involves
76 ### finding all the X libraries that we need to do a complete link.
77 AC_CHECK_LIB(tcl7.5, Tcl_CreateInterp, have_tcl=true, have_tcl=false, -lm)
78 if $have_tcl; then :; else
79 build_subdirs="`echo $build_subdirs | sed s:gtcltk-lib::`"
80 req_subdirs="`echo $req_subdirs | sed s:gtcltk-lib::`"
83 ### Write the list of survivors, the directories we do want to build,
84 ### to a file in the top level, so the subdirectories' configuration
85 ### scripts can find it. We don't want to pass the list in the
86 ### environment, because the subdirectory configuration scripts can be
88 echo "${build_subdirs}" > config.build-subdirs
90 AC_SUBST(existingdirs)
91 AC_SUBST(build_subdirs)
92 AC_SUBST(GUILE_VERSION)
93 AC_OUTPUT(Makefile doc/Makefile)