]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/aclocal.m4
release: 1.1.44
[lilypond.git] / stepmake / aclocal.m4
1 dnl aclocal.m4   -*-shell-script-*-
2 dnl StepMake subroutines for configure.in
3
4 AC_DEFUN(AC_STEPMAKE_COMPILE, [
5     # -O is necessary to get inlining
6     OPTIMIZE=""
7     CXXFLAGS=${CXXFLAGS:-""}
8     CFLAGS=${CFLAGS:-""}
9     checking_b=yes
10     optimise_b=no
11     profile_b=no
12     debug_b=yes
13
14     AC_ARG_ENABLE(checking,
15     [  enable-checking         set runtime checks (assert calls). Default: on],
16     [checking_b=$enableval] )
17
18     # actually, the default is: tja='-O' to get inlining...
19     # off=''  --jcn
20
21     #actually, that sucks.
22     #  tja looks like a typo.  Default is optimisation off. --hwn
23     
24     AC_ARG_ENABLE(optimise,
25     [  enable-optimise         use maximal speed optimisations. Default: off],
26     [optimise_b=$enableval])
27     
28     AC_ARG_ENABLE(profiling, 
29     [  enable-profiling        compile with gprof support. Default: off],
30     [profile_b=$enableval])
31     
32     AC_ARG_ENABLE(debugging,
33     [  enable-debugging        set debug info. Default: on],
34     [debug_b=$enableval])
35
36     AC_ARG_ENABLE(mingw-prefix,
37     [  enable-mingw-prefix=DIR set the mingw32 directory (standalone windows32 exes)],
38     [MINGWPREFIX=$enableval],
39     [MINGWPREFIX=no])
40
41     if test "$printing_b" = no; then
42         # ugh
43         AC_DEFINE(NPRINT)
44         DEFINES="$DEFINES -DNPRINT"
45     fi
46         
47     if test "$checking_b" = no; then
48         # ugh
49         AC_DEFINE(NDEBUG)
50         DEFINES="$DEFINES -DNDEBUG"
51     fi
52
53     if test "$optimise_b" = yes; then
54         OPTIMIZE="-O2 -finline-functions"
55     fi
56
57     if test "$optimise_b" = no; then
58         OPTIMIZE=""
59     fi
60
61     if test $profile_b = yes; then
62         EXTRA_LIBES="-pg"
63         OPTIMIZE="$OPTIMIZE -pg"
64     fi
65
66     if test $debug_b = yes; then        
67         OPTIMIZE="$OPTIMIZE -g"
68     fi
69
70     # however, C++ support in mingw32 v 0.1.4 is still flaky
71     if test x$MINGWPREFIX != xno; then 
72         ICFLAGS="-I$MINGWPREFIX/include"
73         ILDFLAGS="-$MINGWPREFIX/lib"
74     fi
75
76     AC_PROG_CC
77     LD='$(CC)'
78     AC_SUBST(LD)
79
80     CFLAGS="$CFLAGS $OPTIMIZE"
81     CPPFLAGS=${CPPFLAGS:-""}
82     AC_SUBST(CFLAGS)
83     AC_SUBST(CPPFLAGS)
84     AC_SUBST(LDFLAGS)
85     AC_SUBST(ICFLAGS)
86     AC_SUBST(ILDFLAGS)
87     AC_SUBST(DEFINES)
88     AC_SUBST(EXTRA_LIBES)
89 ])
90
91 AC_DEFUN(AC_STEPMAKE_CXX, [
92     AC_LANG_CPLUSPLUS
93     AC_PROG_CXX
94
95     AC_CHECK_HEADER(FlexLexer.h, true,
96         AC_STEPMAKE_WARN(can"\'"t find flex header. Please install Flex headers correctly))
97
98     CPPFLAGS="$CPPFLAGS $DEFINES"
99     CXXFLAGS="$CXXFLAGS $OPTIMIZE"
100     LDFLAGS=$EXTRA_LIBES
101
102     AC_SUBST(CXXFLAGS)
103     AC_SUBST(CXX)
104     LD='$(CXX)'
105     AC_SUBST(LD)
106 ])
107
108 AC_DEFUN(AC_STEPMAKE_CXXTEMPLATE, [
109     AC_CACHE_CHECK([whether explicit instantiation is needed],
110         lily_cv_need_explicit_instantiation,
111         AC_TRY_LINK([
112     template <class T> struct foo { static int baz; };
113     template <class T> int foo<T>::baz = 1;
114     ], [ return foo<int>::baz; ],
115             lily_cv_need_explicit_instantiation=no,
116             lily_cv_need_explicit_instantiation=yes))
117     if test x"$lily_cv_need_explicit_instantiation"x = x"yes"x; then
118         AC_DEFINE(NEED_EXPLICIT_INSTANTIATION)
119     fi
120 ])
121
122 AC_DEFUN(AC_STEPMAKE_DATADIR, [
123     if test "$datadir" = "\${prefix}/share"; then
124             datadir='${prefix}/share/'$package
125     fi
126     DIR_DATADIR=${datadir}
127     presome=${prefix}
128     if test "$prefix" = "NONE"; then
129             presome=${ac_default_prefix}
130     fi
131     DIR_DATADIR=`echo ${DIR_DATADIR} | sed "s!\\\${prefix}!$presome!"`
132     AC_SUBST(datadir)
133     AC_SUBST(DIR_DATADIR)
134     AC_DEFINE_UNQUOTED(DIR_DATADIR, "${DIR_DATADIR}")
135 ])
136
137 AC_DEFUN(AC_STEPMAKE_END, [
138     AC_OUTPUT($CONFIGFILE.make:config.make.in)
139
140     rm -f GNUmakefile
141     cp make/toplevel.make.in ./GNUmakefile
142     chmod 444 GNUmakefile
143 ])
144
145 AC_DEFUN(AC_STEPMAKE_GXX, [
146     # ugh autoconf
147     # urg, egcs: how to check for egcs >= 1.1?
148     changequote(<<, >>)dnl
149     if $CXX --version | grep '2\.8' > /dev/null ||
150         $CXX --version | grep 'egcs' > /dev/null
151     changequote([, ])dnl
152     then
153             true
154     else
155             AC_STEPMAKE_WARN(can\'t find g++ 2.8 or egcs 1.1)
156     fi
157 ])
158
159 AC_DEFUN(AC_STEPMAKE_GUILE, [
160     # on some systems, -lguile succeeds for guile-1.3
161     # others need readline, dl (or even more)
162     # urg, must check for different functions in libguile
163     # to force new check iso reading from cache
164
165     # gh_scm2doubles,gh_doubles2scm are new in 1.3
166     GUILE_FLAGS
167     AC_CHECK_LIB(guile, gh_scm2doubles,
168       [LIBS="`echo $GUILE_LDFLAGS | sed -e 's/-L[[/-_a-zA-Z0-9]]\+ //g'` $LIBS"
169       AC_DEFINE(HAVE_LIBGUILE)], , $GUILE_LDFLAGS dnl
170     )
171     if test "$ac_cv_lib_guile_gh_scm2doubles" != yes ; then
172         AC_STEPMAKE_WARN(You should install guile 1.3 or newer)
173     fi
174 ])
175
176 AC_DEFUN(AC_STEPMAKE_INIT, [
177
178     . $srcdir/VERSION
179     FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
180     if test x$MY_PATCH_LEVEL != x; then
181         FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
182     fi
183
184     # urg: don't "fix" this: irix doesn't know about [:lower:] and [:upper:]
185     changequote(<<, >>)dnl
186     PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
187     package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
188     changequote([, ])dnl
189
190     # No versioning on directory names of sub-packages 
191     # urg, urg
192     stepmake=${datadir}/stepmake
193     presome=${prefix}
194     if test "$prefix" = "NONE"; then
195             presome=${ac_default_prefix}
196     fi
197     stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
198
199     AC_MSG_CHECKING(Package)
200     if test "x$PACKAGE" = "xSTEPMAKE"; then
201         AC_MSG_RESULT(Stepmake package!)
202         (cd stepmake; rm -f stepmake; ln -s ../stepmake .)
203         (cd stepmake; rm -f bin; ln -s ../bin .)
204         AC_CONFIG_AUX_DIR(bin)
205         stepmake=stepmake
206     else
207         AC_MSG_RESULT($PACKAGE)
208         AC_MSG_CHECKING(for stepmake)
209         # Check for installed stepmake
210         if test -d $stepmake; then
211             AC_MSG_RESULT($stepmake)
212         else
213             stepmake='$(depth)'/stepmake
214             AC_MSG_RESULT(./stepmake  ($datadir/stepmake not found))
215         fi
216         AC_CONFIG_AUX_DIR(\
217           $HOME/usr/local/share/stepmake/bin\
218           $HOME/usr/local/lib/stepmake/bin\
219           $HOME/usr/share/stepmake/bin\
220           $HOME/usr/lib/stepmake/bin\
221           /usr/local/share/stepmake/bin\
222           /usr/local/lib/stepmake/bin\
223           /usr/share/stepmake/bin\
224           /usr/lib/stepmake/bin\
225           stepmake/bin\
226         )
227     fi
228
229     AC_SUBST(stepmake)
230     AC_SUBST(package)
231     AC_SUBST(PACKAGE)
232     AC_SUBST(PACKAGE_NAME)
233     AC_DEFINE_UNQUOTED(PACKAGE, "${PACKAGE_NAME}")
234     AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, "${FULL_VERSION}")
235
236     if test "$package_depth" = "" ; then
237         package_depth="."
238     else
239         package_depth="../$package_depth"
240     fi
241     export package_depth
242     AC_SUBST(package_depth)
243
244     AUTOGENERATE="This file was automatically generated by configure"
245     AC_SUBST(AUTOGENERATE)
246     absolute_builddir="`pwd`"
247     AC_SUBST(absolute_builddir)
248
249     STATE_VECTOR=`ls make/STATE-VECTOR 2>/dev/null`
250     if test "x$STATE_VECTOR" != "x"; then
251         STATE_VECTOR="\$(depth)/$STATE_VECTOR"
252     fi
253     AC_SUBST(STATE_VECTOR)
254
255     CONFIGSUFFIX=
256     AC_ARG_ENABLE(config,
257     [  enable-config=FILE      put configure settings in config-FILE.make],
258     [CONFIGSUFFIX=$enableval])
259
260     if test "$CONFIGSUFFIX" != "" ; then
261         CONFIGFILE=config-$CONFIGSUFFIX
262     else
263         CONFIGFILE=config
264     fi
265     AC_SUBST(CONFIGSUFFIX)
266      
267     AC_CANONICAL_HOST
268     AC_CHECK_PROGS(MAKE, gmake make, error)
269     AC_CHECK_PROGS(FIND, find, error)
270
271 dnl system supplied INSTALL is unsafe; use our own install.
272 dnl    AC_PROG_INSTALL
273 dnl    if test "$INSTALL" = "bin/install-sh"; then
274 dnl     export INSTALL="\$\(depth\)/bin/install-sh"
275 dnl    fi
276
277     AC_CHECK_PROGS(TAR, tar, error)
278
279     if test "x`uname`" = "xHP-UX"; then
280         AC_PATH_PROG(BASH, bash, /bin/sh)
281         AC_STEPMAKE_WARN(avoiding buggy /bin/sh)
282         AC_PATH_PROG(SHELL, bash, /bin/ksh)
283     else
284         AC_PATH_PROG(BASH, bash, /bin/sh)
285         SHELL=/bin/sh
286         AC_SUBST(SHELL)
287     fi
288
289
290     AC_PATH_PROG(PYTHON, ${PYTHON:-python}, -echo no python)
291     AC_SUBST(PYTHON)
292
293     if test $MAKE != "error" ; then
294         $MAKE -v 2> /dev/null | grep GNU > /dev/null
295         if test "$?" = 1
296         then
297                 AC_STEPMAKE_WARN(Please install *GNU* make) 
298         fi
299     fi 
300
301     AC_CHECK_SEARCH_RESULT($PYTHON, python, You should install Python)
302
303     if test "x$OSTYPE" = "xcygwin32" || test "x$OSTYPE" = "xWindows_NT"; then
304         LN=cp # hard link does not work under cygnus-nt
305         LN_S='cp -r' # symbolic link does not work for native nt
306         ZIP="zip -r -9" #
307         DOTEXE=.exe
308         # urg
309         # DIRSEP='\\'
310         # PATHSEP=';'
311         #
312         # cygwin fixes all these things.  
313         # it seems these were used because of dos-style TEXINPUTS and
314         # MFINPUTS needed for miktex.
315         # but this breaks parsing of all other cygwin/unix style paths.
316         #
317         # if your (mik)tex breaks, make a:
318         #    /usr/local/bin/tex:
319         #    #!/bin/sh
320         #    TEXINPUTS=`cygpath -pw $TEXINPUTS` /texmf/miktex/bin/tex $*
321         #
322         # and
323         #
324         #    /usr/local/bin/mf:
325         #    #!/bin/sh
326         #    MFINPUTS=`cygpath -pw $MFINPUTS` /texmf/miktex/bin/mf $*
327         #
328         # this way, you may have buildscripts/out/lilypond-profile 
329         # 'automatically' sourced from /usr/etc/profile.d/ too.
330         #
331         DIRSEP='/'
332         PATHSEP=':'
333         INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
334     else
335         DIRSEP='/'
336         PATHSEP=':'
337         LN=ln
338         LN_S='ln -s'
339         ZIP="zip -r -9"
340         INSTALL="\$(SHELL) \$(stepdir)/../bin/install-sh -c"
341     fi
342     AC_SUBST(DOTEXE)
343     AC_SUBST(ZIP)
344     AC_SUBST(LN)
345     AC_SUBST(LN_S)
346     AC_SUBST(INSTALL)
347     AC_DEFINE_UNQUOTED(DIRSEP, '${DIRSEP}')
348     AC_DEFINE_UNQUOTED(PATHSEP, '${PATHSEP}')
349     AC_SUBST(PATHSEP)
350     AC_SUBST(DIRSEP)
351   
352    
353     AC_STEPMAKE_DATADIR
354 ])
355
356 AC_DEFUN(AC_STEPMAKE_LEXYACC, [
357     # ugh, automake: we want (and check for) bison
358     AC_PROG_YACC
359     # ugh, automake: we want (and check for) flex
360     # AC_PROG_LEX
361     # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
362
363     # AC_DECL_YYTEXT
364     # ugh, ugh
365     ac_cv_prog_lex_root=lex.yy
366
367     AC_CHECK_PROGS(BISON, bison, error)
368     AC_CHECK_PROGS(FLEX, flex, error)
369     AC_CHECK_SEARCH_RESULT($BISON, bison,  Please install Bison, 1.25 or newer)
370     AC_CHECK_SEARCH_RESULT($FLEX,  flex, Please install Flex, 2.5 or newer)
371
372     if test $BISON != "error"; then
373         bison_version=`$BISON --version | sed 's/^.*version 1.//g'`
374         if test `echo $bison_version | sed 's/\..*$//g'` -lt 25; then
375             AC_STEPMAKE_WARN(Your bison is a bit old (1.$bison_version). You might have to install 1.25)
376         fi      
377     fi
378
379     AC_SUBST(BISON)
380     AC_SUBST(FLEX)
381 ])
382
383 AC_DEFUN(AC_STEPMAKE_LIB, [
384     AC_CHECK_PROGS(AR, ar, error)
385     AC_PROG_RANLIB
386
387     AC_SUBST(AR)
388     AC_SUBST(RANLIB)
389 ])
390
391 AC_DEFUN(AC_STEPMAKE_LIBTOOL, [
392     # libtool.info ...
393     # **Never** try to set library version numbers so that they correspond
394     # to the release number of your package.  This is an abuse that only
395     # fosters misunderstanding of the purpose of library versions.
396
397     REVISION=$PATCH_LEVEL
398     # CURRENT=$MINOR_VERSION
399     CURRENT=`expr $MINOR_VERSION + 1`
400     # AGE=$(expr $MAJOR_VERSION + 1)
401     AGE=$MAJOR_VERSION
402     AC_SUBST(CURRENT)
403     AC_SUBST(REVISION)
404     AC_SUBST(AGE)
405 ])
406
407 AC_DEFUN(AC_STEPMAKE_LOCALE, [
408     lang=English
409     ALL_LINGUAS="en nl"
410
411     # with/enable ??
412     AC_ARG_WITH(localedir,
413     [  with-localedir=LOCALE   use LOCALE as locale dir. Default: PREFIX/share/locale ],
414     localedir=$with_localedir,
415     localedir='${prefix}/share/locale')
416
417     AC_ARG_WITH(lang,
418     [  with-lang=LANG          use LANG as language to emit messages],
419     language=$with_lang,
420     language=English)
421
422     AC_MSG_CHECKING(language)    
423     case "$language" in
424       En* | en* | Am* | am* | US* | us*)
425             lang=English;;
426       NL | nl | Du* | du* | Ned* | ned*)
427             lang=Dutch;;
428       "")
429             lang=English;;
430       *)
431             lang=unknown;;
432     esac
433     AC_MSG_RESULT($lang)
434
435     if test "$lang" = "unknown" ; then
436         AC_STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS)
437     fi
438
439 ])
440
441 AC_DEFUN(AC_STEPMAKE_GETTEXT, [
442     DIR_LOCALEDIR=${localedir}
443     presome=${prefix}
444     if test "$prefix" = "NONE"; then
445             presome=${ac_default_prefix}
446     fi
447     DIR_LOCALEDIR=`echo ${DIR_LOCALEDIR} | sed "s!\\\${prefix}!$presome!"`
448     AC_SUBST(localedir)
449     AC_SUBST(DIR_LOCALEDIR)
450     AC_DEFINE_UNQUOTED(DIR_LOCALEDIR, "${DIR_LOCALEDIR}")
451
452     AC_CHECK_LIB(intl, gettext)
453     AC_CHECK_FUNCS(gettext)
454 ])
455
456 AC_DEFUN(AC_STEPMAKE_MAN, [
457     AC_CHECK_PROGS(GROFF, groff ditroff, -echo no groff)
458     AC_CHECK_PROGS(TROFF, troff, -echo no troff)
459     AC_CHECK_PROGS(TBL, tbl, cat)
460 ])
461
462 AC_DEFUN(AC_STEPMAKE_MSGFMT, [
463     # AC_CHECK_PROGS(MSGFMT, msgfmt, -echo no msgfmt)
464     AC_CHECK_PROGS(MSGFMT, msgfmt, \$(SHELL) \$(step-bindir)/fake-msgfmt.sh )
465     AC_MSG_CHECKING(whether msgfmt accepts -o)
466     msgfmt_output="`msgfmt -o bla 2>&1 | grep usage`"
467     if test "$msgfmt_output" = ""; then
468         AC_MSG_RESULT(yes)
469     else
470         # urg
471         MSGFMT="\$(SHELL) \$(step-bindir)/fake-msgfmt.sh"
472         AC_MSG_RESULT(no)
473         AC_STEPMAKE_WARN(please install msgfmt from GNU gettext)
474     fi
475     if test ! -n "$MSGFMT"; then
476         AC_STEPMAKE_WARN(please install msgfmt from GNU gettext)
477     fi
478 ])
479
480 #why has this been dropped?
481 AC_DEFUN(XXAC_STEPMAKE_TEXMF_DIRS, [
482     AC_ARG_ENABLE(tex-prefix,
483     [  enable-tex-prefix=DIR   set the tex-directory to find TeX subdirectories. (default: PREFIX)],
484     [TEXPREFIX=$enableval],
485     [TEXPREFIX=auto] )
486     
487     AC_ARG_ENABLE(tex-dir,
488     [  enable-tex-dir=DIR      set the directory to put $PACKAGE_NAME TeX files in. ],
489     [TEXDIR=$enableval],
490     [TEXDIR=auto] )
491
492     AC_ARG_ENABLE(mf-dir,
493     [  enable-mf-dir=DIR       set the directory to put $PACKAGE_NAME MetaFont files in. ],
494     [MFDIR=$enableval],
495     [MFDIR=auto])
496
497     if test "x$TEXPREFIX" = xauto ; then
498         AC_TEX_PREFIX(TEXPREFIX)
499     else
500      find_texprefix=$TEXPREFIX
501     fi
502
503     if test "x$MFDIR" = xauto; then
504         AC_MF_SUBDIR(MFDIR)
505     fi
506         
507     if test "x$TEXDIR" = xauto ; then
508         AC_TEX_SUBDIR(TEXDIR)
509     fi
510     AC_SUBST(TEXPREFIX)
511     AC_SUBST(TEXDIR)
512     AC_SUBST(MFDIR)
513 ])
514
515 AC_DEFUN(AC_STEPMAKE_TEXMF_DIRS, [
516     AC_ARG_ENABLE(tex-tfmdir,
517     [  enable-tex-tfmdir=DIR   set the tex-directory where cmr10.tfm lives (default: use kpsewhich)],
518     [TFMDIR=$enableval],
519     [TFMDIR=auto] )
520
521     AC_CHECK_PROGS(KPSEWHICH, kpsewhich, no)
522     AC_MSG_CHECKING(for TeX TFM directory)
523     if test "x$TFMDIR" = xauto ; then
524         if test "x$TEX_TFMDIR" = "x" ; then
525             if test "x$KPSEWHICH" != "xno" ; then
526                 CMR10=`kpsewhich tfm cmr10.tfm`
527                 TEX_TFMDIR=`dirname $CMR10`
528             else
529                 AC_STEPMAKE_WARN(Please set TEX_TFMDIR (to where cmr10.tfm lives):
530         TEX_TFMDIR=/usr/local/TeX/lib/tex/fonts ./configure)
531             fi
532         fi
533     fi
534     AC_MSG_RESULT($TEX_TFMDIR)
535     AC_SUBST(TEX_TFMDIR)
536 ])
537
538 AC_DEFUN(AC_STEPMAKE_TEXMF, [
539     # urg, never know what names these teTeX guys will think up
540
541     AC_CHECK_PROGS(METAFONT, mf, no)
542     if test "x$METAFONT" = "xno"; then
543         AC_CHECK_PROGS(MFONT, mfont, -echo no mf or mfont)
544         METAFONT=$MFONT
545     fi
546
547     AC_CHECK_PROGS(METAPOST, mp, no)
548     if test "x$METAPOST" = "xno"; then
549         AC_CHECK_PROGS(MPOST, mpost, -echo no mp or mpost)
550
551         METAPOST=$MPOST
552     fi
553
554     AC_CHECK_PROGS(INIMETAFONT, inimf, no)
555     if test "x$INIMETAFONT" = "xno"; then
556         AC_CHECK_PROGS(INIMFONT, inimfont, -echo no inimf or inimfont)
557         INIMETAFONT=$INIMFONT
558     fi
559
560     AC_CHECK_PROGS(INIMETAPOST, inimp, no)
561     if test "x$INIMETAPOST" = "xno"; then
562         AC_CHECK_PROGS(INIMPOST, inimpost, -echo no inimp or inimpost)
563         INIMETAPOST=$INIMPOST
564     fi
565
566     AC_MSG_CHECKING(for working metafont mode)
567     modelist='ljfour lj4 lj3 lj2 ljet laserjet'
568     for MFMODE in $modelist; do
569         $METAFONT "\mode:=$MFMODE; mode_setup; end." > /dev/null 2>&1
570         if test -f mfput.tfm; then
571             break;
572         fi
573     done
574     rm -f mfput.*
575     AC_MSG_RESULT($MFMODE)
576
577     AC_SUBST(METAFONT)
578     AC_SUBST(METAPOST)
579     AC_SUBST(MFMODE)
580     AC_SUBST(INIMETAFONT)
581     AC_SUBST(INIMETAPOST)
582 ])
583
584 AC_DEFUN(AC_STEPMAKE_WARN, [
585     AC_MSG_WARN($1)
586     warn_b=yes
587 ])
588
589 AC_DEFUN(AC_STEPMAKE_YODL, [
590     if test "x$YODL" = "x"; then 
591         AC_CHECK_PROGS(STRIPROFF, striproff, -echo no striproff)
592         AC_CHECK_PROGS(YODL, yodl, -echo no yodl)
593         AC_CHECK_PROGS(YODL2HTML, yodl2html, -echo no yodl)
594         AC_CHECK_PROGS(YODL2LATEX, yodl2latex, )
595         AC_CHECK_PROGS(YODL2MAN, yodl2man, -echo no yodl)
596         AC_CHECK_PROGS(YODL2MSLESS, yodl2msless, -echo no yodl)
597         AC_CHECK_PROGS(YODL2TEXINFO, yodl2texinfo, -echo no yodl)
598         AC_CHECK_PROGS(YODL2TXT, yodl2txt, -echo no yodl)
599         YODL2LESS_DIR='$(bindir)/'
600     else
601         AC_SUBST(STRIPROFF)
602         AC_SUBST(YODL)
603         AC_SUBST(YODL2HTML)
604         AC_SUBST(YODL2LATEX)
605         AC_SUBST(YODL2LESS_DIR)
606         AC_SUBST(YODL2MAN)
607         AC_SUBST(YODL2MSLESS)
608         AC_SUBST(YODL2TEXINFO)
609         AC_SUBST(YODL2TXT)
610         export STRIPROFF YODL YODL2HTML YODL2LATEX YODL2MAN YODL2MSLESS YODL2TEXINFO YODL2TXT
611     fi
612     if test "x$YODL" = "-echo no yodl"; then
613         AC_STEPMAKE_WARN(Did not find YODL (Yodl is Yet Oneother Document Language, see http://www.cs.uu.nl/~hanwen/yodl))
614     fi    
615 ])
616
617 dnl should cache result.
618 dnl should  look in $prefix first.
619 dnl should probably assume TDS
620
621 AC_DEFUN(AC_TEX_PREFIX, [
622     
623
624     AC_MSG_CHECKING(TeX/MF root dir directory)    
625
626     find_root_prefix="$prefix"
627     
628
629     test "x$find_root_prefix" = xNONE && find_root_prefix="$ac_default_prefix"
630     find_texpostfix="";
631     for postfix in "/lib/tex/" "/lib/texmf" "/lib" "/tex" "/texmf"; do
632         find_texprefix="$find_root_prefix$postfix"
633         if test -d $find_texprefix; then
634             find_texpostfix=$postfix
635             break;
636         fi
637     done
638     
639     if test "x$find_texpostfix" = x; then
640         find_texpostfix='/lib/texmf/tex'
641         AC_STEPMAKE_WARN(Cannot determine the TeX-directory. Please use --enable-tex-prefix)
642     fi
643
644     find_texprefix="$find_root_prefix/$find_texpostfix"
645
646     # only assign if variablename not empty
647     if test x != "x[$]$1"; then
648         $1='${prefix}'/"$find_texpostfix"
649     fi
650     AC_MSG_RESULT($find_texprefix)
651
652 ])
653  
654
655 # find a directory inside a prefix, 
656 # $1 the prefix (expanded version)
657 # $2 variable to assign
658 # $3 the directory name 
659 # $4 description
660 AC_DEFUN(AC_FIND_DIR_IN_PREFIX, [
661     
662     AC_MSG_CHECKING($4 directory)    
663     find_dirdir=`(cd $1; 
664       $FIND ./ -type d -a -name $3 -print |sort|head -1|sed 's#^\./##')`
665     
666
667     if test "x$find_dirdir" = x; then
668        find_dirdir="/$3";
669        AC_STEPMAKE_WARN(Cannot determine $4 subdirectory. Please set from command-line)
670         true
671     fi
672     $2=$find_dirdir
673     AC_MSG_RESULT($1/$find_dirdir)
674 ])
675
676 # ugh.  this is hopeless
677 AC_DEFUN(AC_KPSE_TEX_DIR, [
678         kpse_paths=`(kpsepath -n latex tex; kpsepath -n tex tex) | sed 's/:/ /g' | tr ' ' '\012' |sort | uniq -d`
679         kpse_syspaths=`echo $kpse_paths | grep '!'| sed 's/!//g'`
680         echo $kpse_paths
681         if test -w "$kpse_syspaths";
682         then
683                 dir=`echo $kpse_syspaths | head -1`
684         else
685                 dir=`echo $kpse_paths | grep -v '!'| head -1`
686         fi
687         if test "$prefix" = "NONE"; then
688                 local_prefix=$ac_default_prefix
689                 local_prefix_quote='${prefix}'
690
691         else
692                 local_prefix=$prefix
693                 local_prefix_quote=$prefix
694         fi
695         echo $local_prefix_quote = $local_prefix
696         echo $dir
697         echo $dir  | sed 's!'$local_prefix'!\$local_prefix_quote!g'
698 ])
699
700 AC_DEFUN(AC_TEX_SUBDIR, [
701 dnl    AC_REQUIRE([AC_TEX_PREFIX])
702     AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, tex,TeX input)
703     $1="$TEXPREFIX/$$1"
704 ])
705
706 AC_DEFUN(AC_MF_SUBDIR, [
707 dnl     AC_REQUIRE([AC_TEX_PREFIX])
708     AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, source, MF input)
709     $1="$TEXPREFIX/$$1"
710 ])
711
712 AC_DEFUN(AC_CHECK_SEARCH_RESULT, [
713         result="`echo \"$1\" | grep echo`"
714         if test "x$1" = "xerror" -o "x$result" != "x"; then
715                 AC_STEPMAKE_WARN(can\'t find $2. $3)
716         fi
717 ])
718
719 dnl   GUILE_FLAGS --- set flags for compiling and linking with Guile
720 dnl
721 dnl   This macro runs the `guile-config' script, installed with Guile,
722 dnl   to find out where Guile's header files and libraries are
723 dnl   installed.  It sets two variables, marked for substitution, as
724 dnl   by AC_SUBST.
725 dnl   
726 dnl     GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
727 dnl             code that uses Guile header files.  This is almost
728 dnl             always just a -I flag.
729 dnl   
730 dnl     GUILE_LDFLAGS --- flags to pass to the linker to link a
731 dnl             program against Guile.  This includes `-lguile' for
732 dnl             the Guile library itself, any libraries that Guile
733 dnl             itself requires (like -lqthreads), and so on.  It may
734 dnl             also include a -L flag to tell the compiler where to
735 dnl             find the libraries.
736
737 AC_DEFUN([GUILE_FLAGS],[
738 ## The GUILE_FLAGS macro.
739   ## First, let's just see if we can find Guile at all.
740   AC_MSG_CHECKING(for Guile)
741   guile-config link > /dev/null || {
742     echo "configure: cannot find guile-config; is Guile installed?" 1>&2
743     exit 1
744   }
745   GUILE_CFLAGS="`guile-config compile`"
746   GUILE_LDFLAGS="`guile-config link`"
747   AC_SUBST(GUILE_CFLAGS)
748   AC_SUBST(GUILE_LDFLAGS)
749   AC_MSG_RESULT(yes)
750 ])
751
752
753 # Configure paths for GTK+
754 # Owen Taylor     97-11-3
755
756 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
757 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
758 dnl
759 AC_DEFUN(AM_PATH_GTK,
760 [dnl 
761 dnl Get the cflags and libraries from the gtk-config script
762 dnl
763   AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
764   min_gtk_version=ifelse([$1], ,1.1.1,$1)
765   AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
766   no_gtk=""
767   if test "$GTK_CONFIG" != "no" ; then
768     GTK_CFLAGS=`$GTK_CONFIG --cflags`
769     GTK_LIBS=`$GTK_CONFIG --libs`
770     ac_save_CFLAGS="$CFLAGS"
771     ac_save_LIBS="$LIBS"
772     ac_save_CXXFLAGS="$CXXFLAGS"
773     CFLAGS="$CFLAGS $GTK_CFLAGS"
774     CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
775     LIBS="$LIBS $GTK_LIBS"
776 dnl
777 dnl Now check if the installed GTK is sufficiently new. (Also sanity
778 dnl checks the results of gtk-config to some extent)
779 dnl
780     AC_TRY_RUN([
781 #include <gtk/gtk.h>
782 #include <stdio.h>
783
784 int 
785 main ()
786 {
787   int major, minor, micro;
788
789   if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, &micro) != 3) {
790      printf("%s, bad version string\n", "$min_gtk_version");
791      exit(1);
792    }
793
794    return !((gtk_major_version > major) ||
795             ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
796             ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)));
797 }
798 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
799      CFLAGS="$ac_save_CFLAGS"
800      CXXFLAGS="$ac_save_CXXFLAGS"
801      LIBS="$ac_save_LIBS"
802   else
803      no_gtk=yes
804   fi
805   if test "x$no_gtk" = x ; then
806      AC_MSG_RESULT(yes)
807      ifelse([$2], , :, [$2])     
808   else
809      AC_MSG_RESULT(no)
810      GTK_CFLAGS=""
811      GTK_LIBS=""
812      ifelse([$3], , :, [$3])
813   fi
814   CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
815   AC_SUBST(CXXFLAGS)
816   AC_SUBST(GTK_CFLAGS)
817   AC_SUBST(GTK_LIBS)
818 ])
819
820
821 # Configure paths for GTK--
822 # Erik Andersen 30 May 1998
823 # Modified by Tero Pulkkinen (added the compiler checks... I hope they work..)
824
825 dnl Test for GTK__, and define GTK___CFLAGS and GTK___LIBS
826 dnl   to be used as follows:
827 dnl AM_PATH_GTKMM([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
828 dnl
829
830 dnl Get the cflags and libraries from the gtkmm-config script
831 dnl
832 AC_ARG_WITH(gtkmm-prefix,[  --with-gtkmm-prefix=PREFIX
833                           Prefix where GTK-- is installed (optional)],
834             gtkmm_config_prefix="$withval", gtkmm_config_prefix="")
835 AC_ARG_WITH(gtkmm-exec-prefix,[  --with-gtkmm-exec-prefix=PREFIX
836                           Exec prefix where GTK-- is installed (optional)],
837             gtkmm_config_exec_prefix="$withval", gtkmm_config_exec_prefix="")
838 AC_ARG_ENABLE(gtkmmtest, [  --disable-gtkmmtest     Do not try to compile and run a test GTK-- program],
839                     , enable_gtkmmtest=yes)
840
841   if test x$gtkmm_config_exec_prefix != x ; then
842      gtkmm_config_args="$gtkmm_config_args --exec-prefix=$gtkmm_config_exec_prefix"
843      if test x${GTKMM_CONFIG+set} != xset ; then
844         GTKMM_CONFIG=$gtkmm_config_exec_prefix/bin/gtkmm-config
845      fi
846   fi
847   if test x$gtkmm_config_prefix != x ; then
848      gtkmm_config_args="$gtkmm_config_args --prefix=$gtkmm_config_prefix"
849      if test x${GTKMM_CONFIG+set} != xset ; then
850         GTKMM_CONFIG=$gtkmm_config_prefix/bin/gtkmm-config
851      fi
852   fi
853
854
855 AC_DEFUN(AM_PATH_GTKMM,
856 [dnl 
857
858 dnl
859 dnl Check if the installed GTK-- is sufficiently new.
860 dnl
861   AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
862   min_gtkmm_version=ifelse([$1], ,0.9.14,$1)
863
864   AC_MSG_CHECKING(for GTK-- - version >= $min_gtkmm_version)
865   no_gtkmm=""
866   if test "$GTKMM_CONFIG" = "no" ; then
867     no_gtkmm=yes
868   else
869     AC_LANG_SAVE
870     AC_LANG_CPLUSPLUS
871
872     GTK___CFLAGS=`$GTKMM_CONFIG $gtkmm_config_args --cflags`
873     GTK___LIBS=`$GTKMM_CONFIG $gtkmm_config_args --libs`
874     gtkmm_config_major_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
875            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
876     gtkmm_config_minor_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
877            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
878     gtkmm_config_micro_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
879            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
880     if test "x$enable_gtkmmtest" = "xyes" ; then
881       ac_save_CXXFLAGS="$CXXFLAGS"
882       ac_save_LIBS="$LIBS"
883       CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
884       LIBS="$LIBS $GTK___LIBS"
885 dnl
886 dnl Now check if the installed GTK-- is sufficiently new. (Also sanity
887 dnl checks the results of gtkmm-config to some extent
888 dnl
889       rm -f conf.gtkmmtest
890       AC_TRY_RUN([
891 #include <gtk--.h>
892 #include <stdio.h>
893 #include <stdlib.h>
894
895 int 
896 main ()
897 {
898   int major, minor, micro;
899   char *tmp_version;
900
901   system ("touch conf.gtkmmtest");
902
903   /* HP/UX 0 (%@#!) writes to sscanf strings */
904   tmp_version = g_strdup("$min_gtkmm_version");
905   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
906      printf("%s, bad version string\n", "$min_gtkmm_version");
907      exit(1);
908    }
909
910   if ((gtkmm_major_version != $gtkmm_config_major_version) ||
911       (gtkmm_minor_version != $gtkmm_config_minor_version) ||
912       (gtkmm_micro_version != $gtkmm_config_micro_version))
913     {
914       printf("\n*** 'gtkmm-config --version' returned %d.%d.%d, but GTK-- (%d.%d.%d)\n", 
915              $gtkmm_config_major_version, $gtkmm_config_minor_version, $gtkmm_config_micro_version,
916              gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
917       printf ("*** was found! If gtkmm-config was correct, then it is best\n");
918       printf ("*** to remove the old version of GTK--. You may also be able to fix the error\n");
919       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
920       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
921       printf("*** required on your system.\n");
922       printf("*** If gtkmm-config was wrong, set the environment variable GTKMM_CONFIG\n");
923       printf("*** to point to the correct copy of gtkmm-config, and remove the file config.cache\n");
924       printf("*** before re-running configure\n");
925     } 
926 /* GTK-- does not have the GTKMM_*_VERSION constants */
927 /* 
928   else if ((gtkmm_major_version != GTKMM_MAJOR_VERSION) ||
929            (gtkmm_minor_version != GTKMM_MINOR_VERSION) ||
930            (gtkmm_micro_version != GTKMM_MICRO_VERSION))
931     {
932       printf("*** GTK-- header files (version %d.%d.%d) do not match\n",
933              GTKMM_MAJOR_VERSION, GTKMM_MINOR_VERSION, GTKMM_MICRO_VERSION);
934       printf("*** library (version %d.%d.%d)\n",
935              gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
936     }
937 */
938   else
939     {
940       if ((gtkmm_major_version > major) ||
941         ((gtkmm_major_version == major) && (gtkmm_minor_version > minor)) ||
942         ((gtkmm_major_version == major) && (gtkmm_minor_version == minor) && (gtkmm_micro_version >= micro)))
943       {
944         return 0;
945        }
946      else
947       {
948         printf("\n*** An old version of GTK-- (%d.%d.%d) was found.\n",
949                gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
950         printf("*** You need a version of GTK-- newer than %d.%d.%d. The latest version of\n",
951                major, minor, micro);
952         printf("*** GTK-- is always available from ftp://ftp.gtk.org.\n");
953         printf("***\n");
954         printf("*** If you have already installed a sufficiently new version, this error\n");
955         printf("*** probably means that the wrong copy of the gtkmm-config shell script is\n");
956         printf("*** being found. The easiest way to fix this is to remove the old version\n");
957         printf("*** of GTK--, but you can also set the GTKMM_CONFIG environment to point to the\n");
958         printf("*** correct copy of gtkmm-config. (In this case, you will have to\n");
959         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
960         printf("*** so that the correct libraries are found at run-time))\n");
961       }
962     }
963   return 1;
964 }
965 ],, no_gtkmm=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
966        CXXFLAGS="$ac_save_CXXFLAGS"
967        LIBS="$ac_save_LIBS"
968      fi
969   fi
970   if test "x$no_gtkmm" = x ; then
971      AC_MSG_RESULT(yes)
972      ifelse([$2], , :, [$2])     
973   else
974      AC_MSG_RESULT(no)
975      if test "$GTKMM_CONFIG" = "no" ; then
976        echo "*** The gtkmm-config script installed by GTK-- could not be found"
977        echo "*** If GTK-- was installed in PREFIX, make sure PREFIX/bin is in"
978        echo "*** your path, or set the GTK_CONFIG environment variable to the"
979        echo "*** full path to gtk-config."
980        echo "*** The gtkmm-config script was not available in GTK-- versions"
981        echo "*** prior to 0.9.12. Perhaps you need to update your installed"
982        echo "*** version to 0.9.12 or newer"
983      else
984        if test -f conf.gtkmmtest ; then
985         :
986        else
987           echo "*** Could not run GTK-- test program, checking why..."
988           CXXFLAGS="$CFLAGS $GTKMM_CXXFLAGS"
989           LIBS="$LIBS $GTK___LIBS"
990           AC_TRY_LINK([
991 #include <gtk--.h>
992 #include <stdio.h>
993 ],      [ return ((gtkmm_major_version) || (gtkmm_minor_version) || (gtkmm_micro_version)); ],
994         [ echo "*** The test program compiled, but did not run. This usually means"
995           echo "*** that the run-time linker is not finding GTK-- or finding the wrong"
996           echo "*** version of GTK--. If it is not finding GTK--, you'll need to set your"
997           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
998           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
999           echo "*** is required on your system"
1000           echo "***"
1001           echo "*** If you have an old version installed, it is best to remove it, although"
1002           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
1003         [ echo "*** The test program failed to compile or link. See the file config.log for the"
1004           echo "*** exact error that occured. This usually means GTK-- was incorrectly installed"
1005           echo "*** or that you have moved GTK-- since it was installed. In the latter case, you"
1006           echo "*** may want to edit the gtkmm-config script: $GTKMM_CONFIG" ])
1007           CXXFLAGS="$ac_save_CXXFLAGS"
1008           LIBS="$ac_save_LIBS"
1009        fi
1010      fi
1011      GTK___CFLAGS=""
1012      GTK__LIBS=""
1013      ifelse([$3], , :, [$3])
1014      AC_LANG_RESTORE
1015   fi
1016   AC_SUBST(GTK___CFLAGS)
1017   AC_SUBST(GTK___LIBS)
1018   rm -f conf.gtkmmtest
1019 ])
1020
1021 # Configure paths for GTK--DRAW
1022 # Derek Quinn Wyatt   98-08-21  (adapted from Jan Nieuwenhuizen's code)
1023
1024 dnl AM_PATH_GTK__DRAW([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
1025 dnl Test for GTK--DRAW, and define GTK___CFLAGS and GTK___LIBS
1026 dnl
1027 AC_DEFUN(AM_PATH_GTK__DRAW,
1028 [dnl 
1029 dnl Get the cflags and libraries from the gtk__-config script
1030 dnl
1031   AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
1032   min_gtk___version=ifelse([$1], ,0.0.5,$1)
1033   AC_MSG_CHECKING(for GTK--DRAW - version >= $min_gtk___version)
1034   no_gtk__=""
1035   if test "$GTKMM_CONFIG" != "no" ; then
1036     GTK___CFLAGS=`$GTKMM_CONFIG --cflags`
1037     GTK___LIBS=`$GTKMM_CONFIG --libs`
1038     GTK___DLIBS="$GTK___LIBS -lgtkmmdraw"
1039     GTK___LIBS="$GTK___DLIBS"
1040     ac_save_CFLAGS="$CFLAGS"
1041     ac_save_LIBS="$LIBS"
1042     ac_save_CXXFLAGS="$CXXFLAGS"
1043     CFLAGS="$CFLAGS $GTK___CFLAGS"
1044     CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
1045     LIBS="$LIBS $GTK___LIBS"
1046 dnl
1047 dnl Now check if the installed GTK__ is sufficiently new. (Also sanity
1048 dnl checks the results of gtk__-config to some extent)
1049 dnl
1050     AC_TRY_RUN([
1051 #include <gtk--.h>
1052 #include <stdio.h>
1053
1054 int 
1055 main ()
1056 {
1057   // urg
1058   return 0;
1059 }
1060 ],, no_gtk__=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1061      CFLAGS="$ac_save_CFLAGS"
1062      CXXFLAGS="$ac_save_CXXFLAGS"
1063      LIBS="$ac_save_LIBS"
1064   else
1065      no_gtk__=yes
1066   fi
1067   if test "x$no_gtk__" = x ; then
1068      AC_MSG_RESULT(yes)
1069      ifelse([$2], , :, [$2])     
1070   else
1071      AC_MSG_RESULT(no)
1072      GTK___CFLAGS=""
1073      GTK___LIBS=""
1074      ifelse([$3], , :, [$3])
1075   fi
1076   CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
1077   AC_SUBST(CXXFLAGS)
1078   AC_SUBST(GTK___CFLAGS)
1079   AC_SUBST(GTK___LIBS)
1080 ])
1081
1082 dnl   GUILE_FLAGS --- set flags for compiling and linking with Guile
1083 dnl
1084 dnl   This macro runs the `guile-config' script, installed with Guile,
1085 dnl   to find out where Guile's header files and libraries are
1086 dnl   installed.  It sets two variables, marked for substitution, as
1087 dnl   by AC_SUBST.
1088 dnl   
1089 dnl     GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
1090 dnl             code that uses Guile header files.  This is almost
1091 dnl             always just a -I flag.
1092 dnl   
1093 dnl     GUILE_LDFLAGS --- flags to pass to the linker to link a
1094 dnl             program against Guile.  This includes `-lguile' for
1095 dnl             the Guile library itself, any libraries that Guile
1096 dnl             itself requires (like -lqthreads), and so on.  It may
1097 dnl             also include a -L flag to tell the compiler where to
1098 dnl             find the libraries.
1099
1100 AC_DEFUN([GUILE_FLAGS],[
1101 ## The GUILE_FLAGS macro.
1102   ## First, let's just see if we can find Guile at all.
1103   AC_MSG_CHECKING(for Guile)
1104   guile-config link > /dev/null || {
1105     echo "configure: cannot find guile-config; is Guile installed?" 1>&2
1106     exit 1
1107   }
1108   GUILE_CFLAGS="`guile-config compile`"
1109   GUILE_LDFLAGS="`guile-config link`"
1110   AC_SUBST(GUILE_CFLAGS)
1111   AC_SUBST(GUILE_LDFLAGS)
1112   AC_MSG_RESULT(yes)
1113 ])
1114