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