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