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