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