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