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