1 dnl WARNING WARNING WARNING WARNING
2 dnl do not edit! this is aclocal.m4, generated from stepmake/stepmake/../aclocal.m4
3 dnl aclocal.m4 -*-shell-script-*-
4 dnl StepMake subroutines for configure.in
6 AC_DEFUN(AC_STEPMAKE_COMPILE, [
7 # -O is necessary to get inlining
9 CXXFLAGS=${CXXFLAGS:-""}
16 AC_ARG_ENABLE(checking,
17 [ enable-checking set runtime checks (assert calls). Default: on],
18 [checking_b=$enableval] )
20 # actually, the default is: tja='-O' to get inlining...
23 #actually, that sucks.
24 # tja looks like a typo. Default is optimisation off. --hwn
26 AC_ARG_ENABLE(optimise,
27 [ enable-optimise use maximal speed optimisations. Default: off],
28 [optimise_b=$enableval])
30 AC_ARG_ENABLE(profiling,
31 [ enable-profiling compile with gprof support. Default: off],
32 [profile_b=$enableval])
34 AC_ARG_ENABLE(debugging,
35 [ enable-debugging set debug info. Default: on],
38 AC_ARG_ENABLE(mingw-prefix,
39 [ enable-mingw-prefix=DIR set the mingw32 directory (standalone windows32 exes)],
40 [MINGWPREFIX=$enableval],
43 if test "$printing_b" = no; then
46 DEFINES="$DEFINES -DNPRINT"
49 if test "$checking_b" = no; then
52 DEFINES="$DEFINES -DNDEBUG"
55 if test "$optimise_b" = yes; then
56 OPTIMIZE="-O2 -finline-functions"
59 if test "$optimise_b" = no; then
63 if test $profile_b = yes; then
65 OPTIMIZE="$OPTIMIZE -pg"
68 if test $debug_b = yes; then
69 OPTIMIZE="$OPTIMIZE -g"
72 # however, C++ support in mingw32 v 0.1.4 is still flaky
73 if test x$MINGWPREFIX != xno; then
74 ICFLAGS="-I$MINGWPREFIX/include"
75 ILDFLAGS="-$MINGWPREFIX/lib"
82 CPPFLAGS=${CPPFLAGS:-""}
91 AC_DEFUN(AC_STEPMAKE_CXX, [
95 AC_CHECK_HEADER(FlexLexer.h, true,
96 AC_STEPMAKE_WARN(can"\'"t find flex header. Please install Flex headers correctly))
98 CPPFLAGS="$CPPFLAGS $DEFINES"
99 CXXFLAGS="$CXXFLAGS $OPTIMIZE"
108 AC_DEFUN(AC_STEPMAKE_CXXTEMPLATE, [
109 AC_CACHE_CHECK([whether explicit instantiation is needed],
110 lily_cv_need_explicit_instantiation,
112 template <class T> struct foo { static int baz; };
113 template <class T> int foo<T>::baz = 1;
114 ], [ return foo<int>::baz; ],
115 lily_cv_need_explicit_instantiation=no,
116 lily_cv_need_explicit_instantiation=yes))
117 if test x"$lily_cv_need_explicit_instantiation"x = x"yes"x; then
118 AC_DEFINE(NEED_EXPLICIT_INSTANTIATION)
122 AC_DEFUN(AC_STEPMAKE_DATADIR, [
123 if test "$datadir" = "\${prefix}/share"; then
124 datadir='${prefix}/share/'$package
126 DIR_DATADIR=${datadir}
128 if test "$prefix" = "NONE"; then
129 presome=${ac_default_prefix}
131 DIR_DATADIR=`echo ${DIR_DATADIR} | sed "s!\\\${prefix}!$presome!"`
133 AC_SUBST(DIR_DATADIR)
134 AC_DEFINE_UNQUOTED(DIR_DATADIR, "${DIR_DATADIR}")
137 AC_DEFUN(AC_STEPMAKE_END, [
138 AC_OUTPUT($CONFIGFILE.make:config.make.in)
141 cp make/toplevel.make.in ./GNUmakefile
142 chmod 444 GNUmakefile
145 AC_DEFUN(AC_STEPMAKE_GXX, [
147 changequote(<<, >>)dnl
148 if $CXX --version | grep '2\.[78]' > /dev/null ||
149 $CXX --version | grep 'egcs' > /dev/null
154 AC_STEPMAKE_WARN(can\'t find g++ 2.7, 2.8 or egcs)
158 AC_DEFUN(AC_STEPMAKE_INIT, [
161 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
162 if test x$MY_PATCH_LEVEL != x; then
163 FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
166 # urg: don't "fix" this: irix doesn't know about [:lower:] and [:upper:]
167 changequote(<<, >>)dnl
168 PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
169 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
172 if test "x$PACKAGE" = "xSTEPMAKE"; then
173 echo Stepmake package!
174 (cd stepmake; rm -f stepmake; ln -s ../stepmake .)
175 (cd stepmake; rm -f bin; ln -s ../bin .)
176 AC_CONFIG_AUX_DIR(bin)
178 echo Package: $PACKAGE
179 AC_CONFIG_AUX_DIR(stepmake/bin)
184 AC_SUBST(PACKAGE_NAME)
185 AC_DEFINE_UNQUOTED(PACKAGE, "${PACKAGE_NAME}")
186 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, "${FULL_VERSION}")
188 package_depth=`dirname $cache_file`
189 AC_SUBST(package_depth)
191 AUTOGENERATE="This file was automatically generated by configure"
192 AC_SUBST(AUTOGENERATE)
193 absolute_builddir="`pwd`"
194 AC_SUBST(absolute_builddir)
196 # No versioning on directory names of sub-packages
200 STATE_VECTOR=`ls make/STATE-VECTOR 2>/dev/null`
201 if test "x$STATE_VECTOR" != "x"; then
202 STATE_VECTOR="\$(depth)/$STATE_VECTOR"
204 AC_SUBST(STATE_VECTOR)
207 AC_ARG_ENABLE(config,
208 [ enable-config=FILE put configure settings in config-FILE.make],
209 [CONFIGSUFFIX=$enableval])
211 if test "$CONFIGSUFFIX" != "" ; then
212 CONFIGFILE=config-$CONFIGSUFFIX
216 AC_SUBST(CONFIGSUFFIX)
219 AC_CHECK_PROGS(MAKE, make, error)
220 AC_CHECK_PROGS(FIND, find, error)
223 dnl system supplied INSTALL is unsafe; use our own install.
225 dnl if test "$INSTALL" = "bin/install-sh"; then
226 dnl export INSTALL="\$\(depth\)/bin/install-sh"
229 AC_CHECK_PROGS(TAR, tar, error)
230 AC_CHECK_PROGS(BASH, bash, /bin/sh)
232 AC_PATH_PROG(PYTHON, ${PYTHON:-python}, -echo no python)
236 AC_CHECK_SEARCH_RESULT($MAKE, GNU make, You should install GNU make)
237 if test $MAKE != "error" ; then
238 $MAKE -v| grep GNU > /dev/null
241 AC_STEPMAKE_WARN(Please install *GNU* make)
245 AC_CHECK_SEARCH_RESULT($PYTHON, python, You should install Python)
247 if test "x$OSTYPE" = "xcygwin32" || test "x$OSTYPE" = "xWindows_NT"; then
248 LN=cp # hard link does not work under cygnus-nt
249 LN_S=cp # symbolic link does not work for native nt
254 INSTALL="\$(stepdir)/../bin/install-dot-exe.sh -c"
261 INSTALL="\$(stepdir)/../bin/install-sh -c"
268 AC_DEFINE_UNQUOTED(DIRSEP, '${DIRSEP}')
269 AC_DEFINE_UNQUOTED(PATHSEP, '${PATHSEP}')
277 AC_DEFUN(AC_STEPMAKE_LEXYACC, [
278 # ugh, automake: we want (and check for) bison
280 # ugh, automake: we want (and check for) flex
282 # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
286 ac_cv_prog_lex_root=lex.yy
288 AC_CHECK_PROGS(BISON, bison, error)
289 AC_CHECK_PROGS(FLEX, flex, error)
290 AC_CHECK_SEARCH_RESULT($BISON, bison, Please install Bison, 1.25 or better)
291 AC_CHECK_SEARCH_RESULT($FLEX, flex, Please install Flex, 2.5 or better)
293 if test $BISON != "error"; then
294 bison_version=`$BISON --version| sed 's/^.*version 1.//g' `
295 if test $bison_version -lt 25; then
296 AC_STEPMAKE_WARN(Your bison is a bit old (1.$bison_version). You might have to install 1.25)
304 AC_DEFUN(AC_STEPMAKE_LIB, [
305 AC_CHECK_PROGS(AR, ar, error)
312 AC_DEFUN(AC_STEPMAKE_LIBTOOL, [
314 # **Never** try to set library version numbers so that they correspond
315 # to the release number of your package. This is an abuse that only
316 # fosters misunderstanding of the purpose of library versions.
318 REVISION=$PATCH_LEVEL
319 # CURRENT=$MINOR_VERSION
320 CURRENT=`expr $MINOR_VERSION + 1`
321 # AGE=$(expr $MAJOR_VERSION + 1)
328 AC_DEFUN(AC_STEPMAKE_LOCALE, [
333 AC_ARG_WITH(localedir,
334 [ with-localedir=LOCALE use LOCALE as locale dir. Default: PREFIX/share/locale ],
335 localedir=$with_localedir,
336 localedir='${prefix}/share/locale')
339 [ with-lang=LANG use LANG as language to emit messages],
343 AC_MSG_CHECKING(language)
345 En* | en* | Am* | am* | US* | us*)
347 NL | nl | Du* | du* | Ned* | ned*)
356 if test "$lang" = "unknown" ; then
357 AC_STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS)
362 AC_DEFUN(AC_STEPMAKE_GETTEXT, [
363 DIR_LOCALEDIR=${localedir}
365 if test "$prefix" = "NONE"; then
366 presome=${ac_default_prefix}
368 DIR_LOCALEDIR=`echo ${DIR_LOCALEDIR} | sed "s!\\\${prefix}!$presome!"`
370 AC_SUBST(DIR_LOCALEDIR)
371 AC_DEFINE_UNQUOTED(DIR_LOCALEDIR, "${DIR_LOCALEDIR}")
373 AC_CHECK_LIB(intl, gettext)
374 AC_CHECK_FUNCS(gettext)
377 AC_DEFUN(AC_STEPMAKE_MAN, [
378 AC_CHECK_PROGS(TROFF, troff, -echo no troff)
381 AC_DEFUN(AC_STEPMAKE_MSGFMT, [
382 # AC_CHECK_PROGS(MSGFMT, msgfmt, -echo no msgfmt)
383 AC_CHECK_PROGS(MSGFMT, msgfmt, \$(SHELL) \$(step-bindir)/fake-msgfmt.sh )
384 AC_MSG_CHECKING(whether msgfmt accepts -o)
385 msgfmt_output="`msgfmt -o bla 2>&1 | grep usage`"
386 if test "$msgfmt_output" = ""; then
390 MSGFMT="\$(SHELL) \$(step-bindir)/fake-msgfmt.sh"
392 AC_STEPMAKE_WARN(please install msgfmt from GNU gettext)
394 if test ! -n "$MSGFMT"; then
395 AC_STEPMAKE_WARN(please install msgfmt from GNU gettext)
399 AC_DEFUN(AC_STEPMAKE_TEXMF_DIRS, [
400 AC_ARG_ENABLE(tex-prefix,
401 [ enable-tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)],
402 [TEXPREFIX=$enableval],
405 AC_ARG_ENABLE(tex-dir,
406 [ enable-tex-dir=DIR set the directory to put $PACKAGE_NAME TeX files in. ],
410 AC_ARG_ENABLE(mf-dir,
411 [ enable-mf-dir=DIR set the directory to put $PACKAGE_NAME MetaFont files in. ],
415 if test "x$TEXPREFIX" = xauto ; then
416 AC_TEX_PREFIX(TEXPREFIX)
418 find_texprefix=$TEXPREFIX
421 if test "x$MFDIR" = xauto; then
425 if test "x$TEXDIR" = xauto ; then
426 AC_TEX_SUBDIR(TEXDIR)
433 AC_DEFUN(AC_STEPMAKE_TEXMF, [
434 # urg, never know what names these teTeX guys will think up
435 AC_CHECK_PROGS(METAFONT, mf, no)
436 if test "x$METAFONT" = "xno"; then
437 AC_CHECK_PROGS(MFONT, mfont, -echo no mf or mfont)
441 AC_CHECK_PROGS(METAPOST, mp, no)
442 if test "x$METAPOST" = "xno"; then
443 AC_CHECK_PROGS(MPOST, mpost, -echo no mp or mpost)
451 AC_DEFUN(AC_STEPMAKE_WARN, [
456 AC_DEFUN(AC_STEPMAKE_YODL, [
457 if test "x$YODL" = "x"; then
458 AC_CHECK_PROGS(STRIPROFF, striproff, -echo no striproff)
459 AC_CHECK_PROGS(YODL, yodl, -echo no yodl)
460 AC_CHECK_PROGS(YODL2HTML, yodl2html, -echo no yodl)
461 AC_CHECK_PROGS(YODL2LATEX, yodl2latex, )
462 AC_CHECK_PROGS(YODL2MAN, yodl2man, -echo no yodl)
463 AC_CHECK_PROGS(YODL2MSLESS, yodl2msless, -echo no yodl)
464 AC_CHECK_PROGS(YODL2TEXINFO, yodl2texinfo, -echo no yodl)
465 AC_CHECK_PROGS(YODL2TXT, yodl2txt, -echo no yodl)
472 AC_SUBST(YODL2MSLESS)
473 AC_SUBST(YODL2TEXINFO)
475 export STRIPROFF YODL YODL2HTML YODL2LATEX YODL2MAN YODL2MSLESS YODL2TEXINFO YODL2TXT
477 if test "x$YODL" = "-echo no yodl"; then
478 AC_STEPMAKE_WARN(Did not find YODL (Yodl is Yet Oneother Document Language, see http://www.cs.uu.nl/~hanwen/yodl))
482 dnl should cache result.
483 dnl should look in $prefix first.
484 dnl should probably assume TDS
486 AC_DEFUN(AC_TEX_PREFIX, [
489 AC_MSG_CHECKING(TeX/MF root dir directory)
491 find_root_prefix="$prefix"
494 test "x$find_root_prefix" = xNONE && find_root_prefix="$ac_default_prefix"
496 for postfix in "/lib/tex/" "/lib/texmf" "/lib" "/tex" "/texmf"; do
497 find_texprefix="$find_root_prefix$postfix"
498 if test -d $find_texprefix; then
499 find_texpostfix=$postfix
504 if test "x$find_texpostfix" = x; then
505 find_texpostfix='/lib/texmf/tex'
506 AC_STEPMAKE_WARN(Cannot determine the TeX-directory. Please use --enable-tex-prefix)
509 find_texprefix="$find_root_prefix/$find_texpostfix"
511 # only assign if variablename not empty
512 if test x != "x[$]$1"; then
513 $1='${prefix}'/"$find_texpostfix"
515 AC_MSG_RESULT($find_texprefix)
520 # find a directory inside a prefix,
521 # $1 the prefix (expanded version)
522 # $2 variable to assign
523 # $3 the directory name
525 AC_DEFUN(AC_FIND_DIR_IN_PREFIX, [
527 AC_MSG_CHECKING($4 directory)
529 $FIND ./ -type d -a -name $3 -print |sort|head -1|sed 's#^\./##')`
532 if test "x$find_dirdir" = x; then
534 AC_STEPMAKE_WARN(Cannot determine $4 subdirectory. Please set from command-line)
538 AC_MSG_RESULT($1/$find_dirdir)
541 # ugh. this is hopeless
542 AC_DEFUN(AC_KPSE_TEX_DIR, [
543 kpse_paths=`(kpsepath -n latex tex; kpsepath -n tex tex) | sed 's/:/ /g' | tr ' ' '\012' |sort | uniq -d`
544 kpse_syspaths=`echo $kpse_paths | grep '!'| sed 's/!//g'`
546 if test -w "$kpse_syspaths";
548 dir=`echo $kpse_syspaths | head -1`
550 dir=`echo $kpse_paths | grep -v '!'| head -1`
552 if test "$prefix" = "NONE"; then
553 local_prefix=$ac_default_prefix
554 local_prefix_quote='${prefix}'
558 local_prefix_quote=$prefix
560 echo $local_prefix_quote = $local_prefix
562 echo $dir | sed 's!'$local_prefix'!\$local_prefix_quote!g'
565 AC_DEFUN(AC_TEX_SUBDIR, [
566 dnl AC_REQUIRE([AC_TEX_PREFIX])
567 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, tex,TeX input)
571 AC_DEFUN(AC_MF_SUBDIR, [
572 dnl AC_REQUIRE([AC_TEX_PREFIX])
573 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, source, MF input)
577 AC_DEFUN(AC_CHECK_SEARCH_RESULT, [
578 result="`echo \"$1\" | grep echo`"
579 if test "x$1" = "xerror" -o "x$result" != "x"; then
580 AC_STEPMAKE_WARN(can\'t find $2. $3)
585 # Configure paths for GTK+
586 # Owen Taylor 97-11-3
588 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
589 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
591 AC_DEFUN(AM_PATH_GTK,
593 dnl Get the cflags and libraries from the gtk-config script
595 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
596 min_gtk_version=ifelse([$1], ,1.1.1,$1)
597 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
599 if test "$GTK_CONFIG" != "no" ; then
600 GTK_CFLAGS=`$GTK_CONFIG --cflags`
601 GTK_LIBS=`$GTK_CONFIG --libs`
602 ac_save_CFLAGS="$CFLAGS"
604 ac_save_CXXFLAGS="$CXXFLAGS"
605 CFLAGS="$CFLAGS $GTK_CFLAGS"
606 CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
607 LIBS="$LIBS $GTK_LIBS"
609 dnl Now check if the installed GTK is sufficiently new. (Also sanity
610 dnl checks the results of gtk-config to some extent
619 int major, minor, micro;
621 if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) {
622 printf("%s, bad version string\n", "$min_gtk_version");
626 return !((gtk_major_version > major) ||
627 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
628 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)));
630 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
631 CFLAGS="$ac_save_CFLAGS"
632 CXXFLAGS="$ac_save_CXXFLAGS"
637 if test "x$no_gtk" = x ; then
639 ifelse([$2], , :, [$2])
644 ifelse([$3], , :, [$3])
646 CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
653 # Configure paths for GTK--
654 # Erik Andersen 30 May 1998
655 # Modified by Tero Pulkkinen (added the compiler checks... I hope they work..)
657 dnl Test for GTK__, and define GTK___CFLAGS and GTK___LIBS
658 dnl to be used as follows:
659 dnl AM_PATH_GTKMM([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
662 dnl Get the cflags and libraries from the gtkmm-config script
664 AC_ARG_WITH(gtkmm-prefix,[ --with-gtkmm-prefix=PREFIX
665 Prefix where GTK-- is installed (optional)],
666 gtkmm_config_prefix="$withval", gtkmm_config_prefix="")
667 AC_ARG_WITH(gtkmm-exec-prefix,[ --with-gtkmm-exec-prefix=PREFIX
668 Exec prefix where GTK-- is installed (optional)],
669 gtkmm_config_exec_prefix="$withval", gtkmm_config_exec_prefix="")
670 AC_ARG_ENABLE(gtkmmtest, [ --disable-gtkmmtest Do not try to compile and run a test GTK-- program],
671 , enable_gtkmmtest=yes)
673 if test x$gtkmm_config_exec_prefix != x ; then
674 gtkmm_config_args="$gtkmm_config_args --exec-prefix=$gtkmm_config_exec_prefix"
675 if test x${GTKMM_CONFIG+set} != xset ; then
676 GTKMM_CONFIG=$gtkmm_config_exec_prefix/bin/gtkmm-config
679 if test x$gtkmm_config_prefix != x ; then
680 gtkmm_config_args="$gtkmm_config_args --prefix=$gtkmm_config_prefix"
681 if test x${GTKMM_CONFIG+set} != xset ; then
682 GTKMM_CONFIG=$gtkmm_config_prefix/bin/gtkmm-config
687 AC_DEFUN(AM_PATH_GTKMM,
691 dnl Check check if the installed GTK-- is sufficiently new.
693 AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
694 min_gtkmm_version=ifelse([$1], ,0.9.14,$1)
696 AC_MSG_CHECKING(for GTK-- - version >= $min_gtkmm_version)
698 if test "$GTKMM_CONFIG" = "no" ; then
704 GTK___CFLAGS=`$GTKMM_CONFIG $gtkmm_config_args --cflags`
705 GTK___LIBS=`$GTKMM_CONFIG $gtkmm_config_args --libs`
706 gtkmm_config_major_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
707 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
708 gtkmm_config_minor_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
709 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
710 gtkmm_config_micro_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
711 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
712 if test "x$enable_gtkmmtest" = "xyes" ; then
713 ac_save_CXXFLAGS="$CXXFLAGS"
715 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
716 LIBS="$LIBS $GTK___LIBS"
718 dnl Now check if the installed GTK-- is sufficiently new. (Also sanity
719 dnl checks the results of gtkmm-config to some extent
730 int major, minor, micro;
733 system ("touch conf.gtkmmtest");
735 /* HP/UX 0 (%@#!) writes to sscanf strings */
736 tmp_version = g_strdup("$min_gtkmm_version");
737 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
738 printf("%s, bad version string\n", "$min_gtkmm_version");
742 if ((gtkmm_major_version != $gtkmm_config_major_version) ||
743 (gtkmm_minor_version != $gtkmm_config_minor_version) ||
744 (gtkmm_micro_version != $gtkmm_config_micro_version))
746 printf("\n*** 'gtkmm-config --version' returned %d.%d.%d, but GTK-- (%d.%d.%d)\n",
747 $gtkmm_config_major_version, $gtkmm_config_minor_version, $gtkmm_config_micro_version,
748 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
749 printf ("*** was found! If gtkmm-config was correct, then it is best\n");
750 printf ("*** to remove the old version of GTK--. You may also be able to fix the error\n");
751 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
752 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
753 printf("*** required on your system.\n");
754 printf("*** If gtkmm-config was wrong, set the environment variable GTKMM_CONFIG\n");
755 printf("*** to point to the correct copy of gtkmm-config, and remove the file config.cache\n");
756 printf("*** before re-running configure\n");
758 /* GTK-- does not have the GTKMM_*_VERSION constants */
760 else if ((gtkmm_major_version != GTKMM_MAJOR_VERSION) ||
761 (gtkmm_minor_version != GTKMM_MINOR_VERSION) ||
762 (gtkmm_micro_version != GTKMM_MICRO_VERSION))
764 printf("*** GTK-- header files (version %d.%d.%d) do not match\n",
765 GTKMM_MAJOR_VERSION, GTKMM_MINOR_VERSION, GTKMM_MICRO_VERSION);
766 printf("*** library (version %d.%d.%d)\n",
767 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
772 if ((gtkmm_major_version > major) ||
773 ((gtkmm_major_version == major) && (gtkmm_minor_version > minor)) ||
774 ((gtkmm_major_version == major) && (gtkmm_minor_version == minor) && (gtkmm_micro_version >= micro)))
780 printf("\n*** An old version of GTK-- (%d.%d.%d) was found.\n",
781 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
782 printf("*** You need a version of GTK-- newer than %d.%d.%d. The latest version of\n",
783 major, minor, micro);
784 printf("*** GTK-- is always available from ftp://ftp.gtk.org.\n");
786 printf("*** If you have already installed a sufficiently new version, this error\n");
787 printf("*** probably means that the wrong copy of the gtkmm-config shell script is\n");
788 printf("*** being found. The easiest way to fix this is to remove the old version\n");
789 printf("*** of GTK--, but you can also set the GTKMM_CONFIG environment to point to the\n");
790 printf("*** correct copy of gtkmm-config. (In this case, you will have to\n");
791 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
792 printf("*** so that the correct libraries are found at run-time))\n");
797 ],, no_gtkmm=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
798 CXXFLAGS="$ac_save_CXXFLAGS"
802 if test "x$no_gtkmm" = x ; then
804 ifelse([$2], , :, [$2])
807 if test "$GTKMM_CONFIG" = "no" ; then
808 echo "*** The gtkmm-config script installed by GTK-- could not be found"
809 echo "*** If GTK-- was installed in PREFIX, make sure PREFIX/bin is in"
810 echo "*** your path, or set the GTK_CONFIG environment variable to the"
811 echo "*** full path to gtk-config."
812 echo "*** The gtkmm-config script was not available in GTK-- versions"
813 echo "*** prior to 0.9.12. Perhaps you need to update your installed"
814 echo "*** version to 0.9.12 or later"
816 if test -f conf.gtkmmtest ; then
819 echo "*** Could not run GTK-- test program, checking why..."
820 CXXFLAGS="$CFLAGS $GTKMM_CXXFLAGS"
821 LIBS="$LIBS $GTK___LIBS"
825 ], [ return ((gtkmm_major_version) || (gtkmm_minor_version) || (gtkmm_micro_version)); ],
826 [ echo "*** The test program compiled, but did not run. This usually means"
827 echo "*** that the run-time linker is not finding GTK-- or finding the wrong"
828 echo "*** version of GTK--. If it is not finding GTK--, you'll need to set your"
829 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
830 echo "*** to the installed location Also, make sure you have run ldconfig if that"
831 echo "*** is required on your system"
833 echo "*** If you have an old version installed, it is best to remove it, although"
834 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
835 [ echo "*** The test program failed to compile or link. See the file config.log for the"
836 echo "*** exact error that occured. This usually means GTK-- was incorrectly installed"
837 echo "*** or that you have moved GTK-- since it was installed. In the latter case, you"
838 echo "*** may want to edit the gtkmm-config script: $GTKMM_CONFIG" ])
839 CXXFLAGS="$ac_save_CXXFLAGS"
845 ifelse([$3], , :, [$3])
848 AC_SUBST(GTK___CFLAGS)
853 # Configure paths for GTK--DRAW
854 # Derek Quinn Wyatt 98-08-21 (adapted from Jan Nieuwenhuizen's code)
856 dnl AM_PATH_GTK__DRAW([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
857 dnl Test for GTK--DRAW, and define GTK___CFLAGS and GTK___LIBS
859 AC_DEFUN(AM_PATH_GTK__DRAW,
861 dnl Get the cflags and libraries from the gtk__-config script
863 AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
864 min_gtk___version=ifelse([$1], ,0.0.5,$1)
865 AC_MSG_CHECKING(for GTK--DRAW - version >= $min_gtk___version)
867 if test "$GTKMM_CONFIG" != "no" ; then
868 GTK___CFLAGS=`$GTKMM_CONFIG --cflags`
869 GTK___LIBS=`$GTKMM_CONFIG --libs`
870 GTK___DLIBS="$GTK___LIBS -lgtkmmdraw"
871 GTK___LIBS="$GTK___DLIBS"
872 ac_save_CFLAGS="$CFLAGS"
874 ac_save_CXXFLAGS="$CXXFLAGS"
875 CFLAGS="$CFLAGS $GTK___CFLAGS"
876 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
877 LIBS="$LIBS $GTK___LIBS"
879 dnl Now check if the installed GTK__ is sufficiently new. (Also sanity
880 dnl checks the results of gtk__-config to some extent
892 ],, no_gtk__=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
893 CFLAGS="$ac_save_CFLAGS"
894 CXXFLAGS="$ac_save_CXXFLAGS"
899 if test "x$no_gtk__" = x ; then
901 ifelse([$2], , :, [$2])
906 ifelse([$3], , :, [$3])
908 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
910 AC_SUBST(GTK___CFLAGS)