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