* print.h: Added declarations of scm_prin1 and scm_prlist.
[bpt/guile.git] / configure.in
CommitLineData
0f2d19dd
JB
1AC_INIT(Makefile.in)
2
f9ec2ec8
JB
3rm -f config.build-subdirs
4
2d26def0
JB
5. $srcdir/GUILE-VERSION
6
0f2d19dd
JB
7all_subdirs=`cat $srcdir/*/PLUGIN/REQ $srcdir/*/PLUGIN/OPT /dev/null | tsort | xargs echo`
8req_subdirs=`cat $srcdir/*/PLUGIN/REQ /dev/null | tsort | xargs echo`
9opt_subdirs=`cat $srcdir/*/PLUGIN/OPT /dev/null | tsort | xargs echo`
86789f9b 10
0f2d19dd
JB
11AC_CONFIG_SUBDIRS($all_subdirs)
12existingdirs=
13for 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
19 else
20 echo ===
21 echo === Configuring plug-in component $d
22 echo ===
23 fi
24 fi
25 fi
26done
27
28for d in $req_subdirs; do
29 if test ! -d $srcdir/$d ; then
30 echo "*******"
31 echo "*******"
32 echo "**\+/**"
33 echo "**=*=**" ERROR: Missing required package: $d
34 echo "**/+\**"
35 echo "*******"
36 echo "*******"
37 exit 1
38 fi
39done
40
41if test "x$verbose" = xyes; then
42 for d in $opt_subdirs; do
43 if test ! -d $srcdir/$d ; then
44 echo "*****"
45 echo "*===*"
46 echo "*=*=*" WARNING: Missing suggested package: $d
47 echo "*===*"
48 echo "*****"
49 fi
50 done
51fi
52
53
f9ec2ec8
JB
54AC_PROG_CC
55
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.
59###
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,
64build_subdirs="${existingdirs}"
65
66### Decide which directories to build; remove the ones we don't want
67### from build_subdirs.
68
31104510
JB
69### On some systems, the Tcl library contains references to
70### functions in the dynamic linker library, -ldl, so we may need
71### to include that.
72AC_CHECK_LIB(dl, dlopen)
73
f9ec2ec8
JB
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.
77AC_CHECK_LIB(tcl7.5, Tcl_CreateInterp, have_tcl=true, have_tcl=false, -lm)
78if $have_tcl; then :; else
79 build_subdirs="`echo $build_subdirs | sed s:gtcltk-lib::`"
80 req_subdirs="`echo $req_subdirs | sed s:gtcltk-lib::`"
81fi
82
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
87### run on their own.
88echo "${build_subdirs}" > config.build-subdirs
89
0f2d19dd 90AC_SUBST(existingdirs)
f9ec2ec8 91AC_SUBST(build_subdirs)
2d26def0
JB
92AC_SUBST(GUILE_VERSION)
93AC_OUTPUT(Makefile doc/Makefile)