1 dnl aclocal.m4 -*-shell-script-*-
2 dnl StepMake subroutines for configure.in
4 AC_DEFUN(AC_STEPMAKE_COMPILE, [
5 # -O is necessary to get inlining
7 CXXFLAGS=${CXXFLAGS:-""}
14 AC_ARG_ENABLE(checking,
15 [ enable-checking set runtime checks (assert calls). Default: on],
16 [checking_b=$enableval] )
18 # actually, the default is: tja='-O' to get inlining...
21 #actually, that sucks.
22 # tja looks like a typo. Default is optimisation off. --hwn
24 AC_ARG_ENABLE(optimise,
25 [ enable-optimise use maximal speed optimisations. Default: off],
26 [optimise_b=$enableval])
28 AC_ARG_ENABLE(profiling,
29 [ enable-profiling compile with gprof support. Default: off],
30 [profile_b=$enableval])
32 AC_ARG_ENABLE(debugging,
33 [ enable-debugging set debug info. Default: on],
36 AC_ARG_ENABLE(mingw-prefix,
37 [ enable-mingw-prefix=DIR set the mingw32 directory (standalone windows32 exes)],
38 [MINGWPREFIX=$enableval],
41 if test "$printing_b" = no; then
44 DEFINES="$DEFINES -DNPRINT"
47 if test "$checking_b" = no; then
50 DEFINES="$DEFINES -DNDEBUG"
53 if test "$optimise_b" = yes; then
54 OPTIMIZE="-O2 -finline-functions"
57 if test "$optimise_b" = no; then
61 if test $profile_b = yes; then
63 OPTIMIZE="$OPTIMIZE -pg"
66 if test $debug_b = yes; then
67 OPTIMIZE="$OPTIMIZE -g"
70 # however, C++ support in mingw32 v 0.1.4 is still flaky
71 if test x$MINGWPREFIX != xno; then
72 ICFLAGS="-I$MINGWPREFIX/include"
73 ILDFLAGS="-$MINGWPREFIX/lib"
80 CPPFLAGS=${CPPFLAGS:-""}
89 AC_DEFUN(AC_STEPMAKE_CXX, [
93 AC_CHECK_HEADER(FlexLexer.h, true,
94 AC_STEPMAKE_WARN(can"\'"t find flex header. Please install Flex headers correctly))
96 CPPFLAGS="$CPPFLAGS $DEFINES"
97 CXXFLAGS="$CXXFLAGS $OPTIMIZE"
106 AC_DEFUN(AC_STEPMAKE_CXXTEMPLATE, [
107 AC_CACHE_CHECK([whether explicit instantiation is needed],
108 lily_cv_need_explicit_instantiation,
110 template <class T> struct foo { static int baz; };
111 template <class T> int foo<T>::baz = 1;
112 ], [ return foo<int>::baz; ],
113 lily_cv_need_explicit_instantiation=no,
114 lily_cv_need_explicit_instantiation=yes))
115 if test x"$lily_cv_need_explicit_instantiation"x = x"yes"x; then
116 AC_DEFINE(NEED_EXPLICIT_INSTANTIATION)
120 AC_DEFUN(AC_STEPMAKE_DATADIR, [
121 if test "$datadir" = "\${prefix}/share"; then
122 datadir='${prefix}/share/'$package
124 DIR_DATADIR=${datadir}
126 if test "$prefix" = "NONE"; then
127 presome=${ac_default_prefix}
129 DIR_DATADIR=`echo ${DIR_DATADIR} | sed "s!\\\${prefix}!$presome!"`
131 AC_SUBST(DIR_DATADIR)
132 AC_DEFINE_UNQUOTED(DIR_DATADIR, "${DIR_DATADIR}")
135 AC_DEFUN(AC_STEPMAKE_END, [
136 AC_OUTPUT($CONFIGFILE.make:config.make.in)
139 cp make/toplevel.make.in ./GNUmakefile
140 chmod 444 GNUmakefile
143 AC_DEFUN(AC_STEPMAKE_GXX, [
145 changequote(<<, >>)dnl
146 if $CXX --version | grep '2\.[78]' > /dev/null ||
147 $CXX --version | grep 'egcs' > /dev/null
152 AC_STEPMAKE_WARN(can\'t find g++ 2.7, 2.8 or egcs)
156 AC_DEFUN(AC_STEPMAKE_INIT, [
159 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
160 if test x$MY_PATCH_LEVEL != x; then
161 FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
164 # urg: don't "fix" this: irix doesn't know about [:lower:] and [:upper:]
165 changequote(<<, >>)dnl
166 PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
167 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
170 if test "x$PACKAGE" = "xSTEPMAKE"; then
171 echo Stepmake package!
172 (cd stepmake; rm -f stepmake; ln -s ../stepmake .)
173 (cd stepmake; rm -f bin; ln -s ../bin .)
174 AC_CONFIG_AUX_DIR(bin)
176 echo Package: $PACKAGE
177 AC_CONFIG_AUX_DIR(stepmake/bin)
182 AC_SUBST(PACKAGE_NAME)
183 AC_DEFINE_UNQUOTED(PACKAGE, "${PACKAGE_NAME}")
184 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, "${FULL_VERSION}")
186 package_depth=`dirname $cache_file`
187 AC_SUBST(package_depth)
189 AUTOGENERATE="This file was automatically generated by configure"
190 AC_SUBST(AUTOGENERATE)
191 absolute_builddir="`pwd`"
192 AC_SUBST(absolute_builddir)
194 # No versioning on directory names of sub-packages
198 STATE_VECTOR=`ls make/STATE-VECTOR 2>/dev/null`
199 if test "x$STATE_VECTOR" != "x"; then
200 STATE_VECTOR="\$(depth)/$STATE_VECTOR"
202 AC_SUBST(STATE_VECTOR)
205 AC_ARG_ENABLE(config,
206 [ enable-config=FILE put configure settings in config-FILE.make],
207 [CONFIGSUFFIX=$enableval])
209 if test "$CONFIGSUFFIX" != "" ; then
210 CONFIGFILE=config-$CONFIGSUFFIX
214 AC_SUBST(CONFIGSUFFIX)
217 AC_CHECK_PROGS(MAKE, make, error)
218 AC_CHECK_PROGS(FIND, find, error)
221 dnl system supplied INSTALL is unsafe; use our own install.
223 dnl if test "$INSTALL" = "bin/install-sh"; then
224 dnl export INSTALL="\$\(depth\)/bin/install-sh"
227 AC_CHECK_PROGS(TAR, tar, error)
228 AC_CHECK_PROGS(BASH, bash, /bin/sh)
230 AC_PATH_PROG(PYTHON, ${PYTHON:-python}, -echo no python)
234 AC_CHECK_SEARCH_RESULT($MAKE, GNU make, You should install GNU make)
235 if test $MAKE != "error" ; then
236 $MAKE -v| grep GNU > /dev/null
239 AC_STEPMAKE_WARN(Please install *GNU* make)
243 AC_CHECK_SEARCH_RESULT($PYTHON, python, You should install Python)
245 if test "x$OSTYPE" = "xcygwin32" || test "x$OSTYPE" = "xWindows_NT"; then
246 LN=cp # hard link does not work under cygnus-nt
247 LN_S=cp # symbolic link does not work for native nt
252 INSTALL="\$(stepdir)/../bin/install-dot-exe.sh -c"
259 INSTALL="\$(stepdir)/../bin/install-sh -c"
266 AC_DEFINE_UNQUOTED(DIRSEP, '${DIRSEP}')
267 AC_DEFINE_UNQUOTED(PATHSEP, '${PATHSEP}')
275 AC_DEFUN(AC_STEPMAKE_LEXYACC, [
276 # ugh, automake: we want (and check for) bison
278 # ugh, automake: we want (and check for) flex
280 # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
284 ac_cv_prog_lex_root=lex.yy
286 AC_CHECK_PROGS(BISON, bison, error)
287 AC_CHECK_PROGS(FLEX, flex, error)
288 AC_CHECK_SEARCH_RESULT($BISON, bison, Please install Bison, 1.25 or better)
289 AC_CHECK_SEARCH_RESULT($FLEX, flex, Please install Flex, 2.5 or better)
291 if test $BISON != "error"; then
292 bison_version=`$BISON --version| sed 's/^.*version 1.//g' `
293 if test $bison_version -lt 25; then
294 AC_STEPMAKE_WARN(Your bison is a bit old (1.$bison_version). You might have to install 1.25)
302 AC_DEFUN(AC_STEPMAKE_LIB, [
303 AC_CHECK_PROGS(AR, ar, error)
310 AC_DEFUN(AC_STEPMAKE_LIBTOOL, [
312 # **Never** try to set library version numbers so that they correspond
313 # to the release number of your package. This is an abuse that only
314 # fosters misunderstanding of the purpose of library versions.
316 REVISION=$PATCH_LEVEL
317 # CURRENT=$MINOR_VERSION
318 CURRENT=`expr $MINOR_VERSION + 1`
319 # AGE=$(expr $MAJOR_VERSION + 1)
326 AC_DEFUN(AC_STEPMAKE_LOCALE, [
331 AC_ARG_WITH(localedir,
332 [ with-localedir=LOCALE use LOCALE as locale dir. Default: PREFIX/share/locale ],
333 localedir=$with_localedir,
334 localedir='${prefix}/share/locale')
337 [ with-lang=LANG use LANG as language to emit messages],
341 AC_MSG_CHECKING(language)
343 En* | en* | Am* | am* | US* | us*)
345 NL | nl | Du* | du* | Ned* | ned*)
354 if test "$lang" = "unknown" ; then
355 AC_STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS)
360 AC_DEFUN(AC_STEPMAKE_GETTEXT, [
361 DIR_LOCALEDIR=${localedir}
363 if test "$prefix" = "NONE"; then
364 presome=${ac_default_prefix}
366 DIR_LOCALEDIR=`echo ${DIR_LOCALEDIR} | sed "s!\\\${prefix}!$presome!"`
368 AC_SUBST(DIR_LOCALEDIR)
369 AC_DEFINE_UNQUOTED(DIR_LOCALEDIR, "${DIR_LOCALEDIR}")
371 AC_CHECK_LIB(intl, gettext)
372 AC_CHECK_FUNCS(gettext)
375 AC_DEFUN(AC_STEPMAKE_MAN, [
376 AC_CHECK_PROGS(TROFF, troff, -echo no troff)
379 AC_DEFUN(AC_STEPMAKE_MSGFMT, [
380 # AC_CHECK_PROGS(MSGFMT, msgfmt, -echo no msgfmt)
381 AC_CHECK_PROGS(MSGFMT, msgfmt, \$(SHELL) \$(step-bindir)/fake-msgfmt.sh )
382 AC_MSG_CHECKING(whether msgfmt accepts -o)
383 msgfmt_output="`msgfmt -o bla 2>&1 | grep usage`"
384 if test "$msgfmt_output" = ""; then
388 MSGFMT="\$(SHELL) \$(step-bindir)/fake-msgfmt.sh"
390 AC_STEPMAKE_WARN(please install msgfmt from GNU gettext)
392 if test ! -n "$MSGFMT"; then
393 AC_STEPMAKE_WARN(please install msgfmt from GNU gettext)
397 AC_DEFUN(AC_STEPMAKE_TEXMF_DIRS, [
398 AC_ARG_ENABLE(tex-prefix,
399 [ enable-tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)],
400 [TEXPREFIX=$enableval],
403 AC_ARG_ENABLE(tex-dir,
404 [ enable-tex-dir=DIR set the directory to put $PACKAGE_NAME TeX files in. ],
408 AC_ARG_ENABLE(mf-dir,
409 [ enable-mf-dir=DIR set the directory to put $PACKAGE_NAME MetaFont files in. ],
413 if test "x$TEXPREFIX" = xauto ; then
414 AC_TEX_PREFIX(TEXPREFIX)
416 find_texprefix=$TEXPREFIX
419 if test "x$MFDIR" = xauto; then
423 if test "x$TEXDIR" = xauto ; then
424 AC_TEX_SUBDIR(TEXDIR)
431 AC_DEFUN(AC_STEPMAKE_TEXMF, [
432 # urg, never know what names these teTeX guys will think up
433 AC_CHECK_PROGS(METAFONT, mf, no)
434 if test "x$METAFONT" = "xno"; then
435 AC_CHECK_PROGS(MFONT, mfont, -echo no mf or mfont)
439 AC_CHECK_PROGS(METAPOST, mp, no)
440 if test "x$METAPOST" = "xno"; then
441 AC_CHECK_PROGS(MPOST, mpost, -echo no mp or mpost)
449 AC_DEFUN(AC_STEPMAKE_WARN, [
454 AC_DEFUN(AC_STEPMAKE_YODL, [
455 if test "x$YODL" = "x"; then
456 AC_CHECK_PROGS(STRIPROFF, striproff, -echo no striproff)
457 AC_CHECK_PROGS(YODL, yodl, -echo no yodl)
458 AC_CHECK_PROGS(YODL2HTML, yodl2html, -echo no yodl)
459 AC_CHECK_PROGS(YODL2LATEX, yodl2latex, )
460 AC_CHECK_PROGS(YODL2MAN, yodl2man, -echo no yodl)
461 AC_CHECK_PROGS(YODL2MSLESS, yodl2msless, -echo no yodl)
462 AC_CHECK_PROGS(YODL2TEXINFO, yodl2texinfo, -echo no yodl)
463 AC_CHECK_PROGS(YODL2TXT, yodl2txt, -echo no yodl)
470 AC_SUBST(YODL2MSLESS)
471 AC_SUBST(YODL2TEXINFO)
473 export STRIPROFF YODL YODL2HTML YODL2LATEX YODL2MAN YODL2MSLESS YODL2TEXINFO YODL2TXT
475 if test "x$YODL" = "-echo no yodl"; then
476 AC_STEPMAKE_WARN(Did not find YODL (Yodl is Yet Oneother Document Language, see http://www.cs.uu.nl/~hanwen/yodl))
480 dnl should cache result.
481 dnl should look in $prefix first.
482 dnl should probably assume TDS
484 AC_DEFUN(AC_TEX_PREFIX, [
487 AC_MSG_CHECKING(TeX/MF root dir directory)
489 find_root_prefix="$prefix"
492 test "x$find_root_prefix" = xNONE && find_root_prefix="$ac_default_prefix"
494 for postfix in "/lib/tex/" "/lib/texmf" "/lib" "/tex" "/texmf"; do
495 find_texprefix="$find_root_prefix$postfix"
496 if test -d $find_texprefix; then
497 find_texpostfix=$postfix
502 if test "x$find_texpostfix" = x; then
503 find_texpostfix='/lib/texmf/tex'
504 AC_STEPMAKE_WARN(Cannot determine the TeX-directory. Please use --enable-tex-prefix)
507 find_texprefix="$find_root_prefix/$find_texpostfix"
509 # only assign if variablename not empty
510 if test x != "x[$]$1"; then
511 $1='${prefix}'/"$find_texpostfix"
513 AC_MSG_RESULT($find_texprefix)
518 # find a directory inside a prefix,
519 # $1 the prefix (expanded version)
520 # $2 variable to assign
521 # $3 the directory name
523 AC_DEFUN(AC_FIND_DIR_IN_PREFIX, [
525 AC_MSG_CHECKING($4 directory)
527 $FIND ./ -type d -a -name $3 -print |sort|head -1|sed 's#^\./##')`
530 if test "x$find_dirdir" = x; then
532 AC_STEPMAKE_WARN(Cannot determine $4 subdirectory. Please set from command-line)
536 AC_MSG_RESULT($1/$find_dirdir)
539 # ugh. this is hopeless
540 AC_DEFUN(AC_KPSE_TEX_DIR, [
541 kpse_paths=`(kpsepath -n latex tex; kpsepath -n tex tex) | sed 's/:/ /g' | tr ' ' '\012' |sort | uniq -d`
542 kpse_syspaths=`echo $kpse_paths | grep '!'| sed 's/!//g'`
544 if test -w "$kpse_syspaths";
546 dir=`echo $kpse_syspaths | head -1`
548 dir=`echo $kpse_paths | grep -v '!'| head -1`
550 if test "$prefix" = "NONE"; then
551 local_prefix=$ac_default_prefix
552 local_prefix_quote='${prefix}'
556 local_prefix_quote=$prefix
558 echo $local_prefix_quote = $local_prefix
560 echo $dir | sed 's!'$local_prefix'!\$local_prefix_quote!g'
563 AC_DEFUN(AC_TEX_SUBDIR, [
564 dnl AC_REQUIRE([AC_TEX_PREFIX])
565 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, tex,TeX input)
569 AC_DEFUN(AC_MF_SUBDIR, [
570 dnl AC_REQUIRE([AC_TEX_PREFIX])
571 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, source, MF input)
575 AC_DEFUN(AC_CHECK_SEARCH_RESULT, [
576 result="`echo \"$1\" | grep echo`"
577 if test "x$1" = "xerror" -o "x$result" != "x"; then
578 AC_STEPMAKE_WARN(can\'t find $2. $3)
583 # Configure paths for GTK+
584 # Owen Taylor 97-11-3
586 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
587 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
589 AC_DEFUN(AM_PATH_GTK,
591 dnl Get the cflags and libraries from the gtk-config script
593 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
594 min_gtk_version=ifelse([$1], ,1.1.1,$1)
595 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
597 if test "$GTK_CONFIG" != "no" ; then
598 GTK_CFLAGS=`$GTK_CONFIG --cflags`
599 GTK_LIBS=`$GTK_CONFIG --libs`
600 ac_save_CFLAGS="$CFLAGS"
602 ac_save_CXXFLAGS="$CXXFLAGS"
603 CFLAGS="$CFLAGS $GTK_CFLAGS"
604 CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
605 LIBS="$LIBS $GTK_LIBS"
607 dnl Now check if the installed GTK is sufficiently new. (Also sanity
608 dnl checks the results of gtk-config to some extent
617 int major, minor, micro;
619 if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) {
620 printf("%s, bad version string\n", "$min_gtk_version");
624 return !((gtk_major_version > major) ||
625 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
626 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)));
628 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
629 CFLAGS="$ac_save_CFLAGS"
630 CXXFLAGS="$ac_save_CXXFLAGS"
635 if test "x$no_gtk" = x ; then
637 ifelse([$2], , :, [$2])
642 ifelse([$3], , :, [$3])
644 CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
651 # Configure paths for GTK--
652 # Erik Andersen 30 May 1998
653 # Modified by Tero Pulkkinen (added the compiler checks... I hope they work..)
655 dnl Test for GTK__, and define GTK___CFLAGS and GTK___LIBS
656 dnl to be used as follows:
657 dnl AM_PATH_GTKMM([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
660 dnl Get the cflags and libraries from the gtkmm-config script
662 AC_ARG_WITH(gtkmm-prefix,[ --with-gtkmm-prefix=PREFIX
663 Prefix where GTK-- is installed (optional)],
664 gtkmm_config_prefix="$withval", gtkmm_config_prefix="")
665 AC_ARG_WITH(gtkmm-exec-prefix,[ --with-gtkmm-exec-prefix=PREFIX
666 Exec prefix where GTK-- is installed (optional)],
667 gtkmm_config_exec_prefix="$withval", gtkmm_config_exec_prefix="")
668 AC_ARG_ENABLE(gtkmmtest, [ --disable-gtkmmtest Do not try to compile and run a test GTK-- program],
669 , enable_gtkmmtest=yes)
671 if test x$gtkmm_config_exec_prefix != x ; then
672 gtkmm_config_args="$gtkmm_config_args --exec-prefix=$gtkmm_config_exec_prefix"
673 if test x${GTKMM_CONFIG+set} != xset ; then
674 GTKMM_CONFIG=$gtkmm_config_exec_prefix/bin/gtkmm-config
677 if test x$gtkmm_config_prefix != x ; then
678 gtkmm_config_args="$gtkmm_config_args --prefix=$gtkmm_config_prefix"
679 if test x${GTKMM_CONFIG+set} != xset ; then
680 GTKMM_CONFIG=$gtkmm_config_prefix/bin/gtkmm-config
685 AC_DEFUN(AM_PATH_GTKMM,
689 dnl Check check if the installed GTK-- is sufficiently new.
691 AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
692 min_gtkmm_version=ifelse([$1], ,0.9.14,$1)
694 AC_MSG_CHECKING(for GTK-- - version >= $min_gtkmm_version)
696 if test "$GTKMM_CONFIG" = "no" ; then
702 GTK___CFLAGS=`$GTKMM_CONFIG $gtkmm_config_args --cflags`
703 GTK___LIBS=`$GTKMM_CONFIG $gtkmm_config_args --libs`
704 gtkmm_config_major_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
705 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
706 gtkmm_config_minor_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
707 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
708 gtkmm_config_micro_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
709 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
710 if test "x$enable_gtkmmtest" = "xyes" ; then
711 ac_save_CXXFLAGS="$CXXFLAGS"
713 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
714 LIBS="$LIBS $GTK___LIBS"
716 dnl Now check if the installed GTK-- is sufficiently new. (Also sanity
717 dnl checks the results of gtkmm-config to some extent
728 int major, minor, micro;
731 system ("touch conf.gtkmmtest");
733 /* HP/UX 0 (%@#!) writes to sscanf strings */
734 tmp_version = g_strdup("$min_gtkmm_version");
735 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
736 printf("%s, bad version string\n", "$min_gtkmm_version");
740 if ((gtkmm_major_version != $gtkmm_config_major_version) ||
741 (gtkmm_minor_version != $gtkmm_config_minor_version) ||
742 (gtkmm_micro_version != $gtkmm_config_micro_version))
744 printf("\n*** 'gtkmm-config --version' returned %d.%d.%d, but GTK-- (%d.%d.%d)\n",
745 $gtkmm_config_major_version, $gtkmm_config_minor_version, $gtkmm_config_micro_version,
746 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
747 printf ("*** was found! If gtkmm-config was correct, then it is best\n");
748 printf ("*** to remove the old version of GTK--. You may also be able to fix the error\n");
749 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
750 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
751 printf("*** required on your system.\n");
752 printf("*** If gtkmm-config was wrong, set the environment variable GTKMM_CONFIG\n");
753 printf("*** to point to the correct copy of gtkmm-config, and remove the file config.cache\n");
754 printf("*** before re-running configure\n");
756 /* GTK-- does not have the GTKMM_*_VERSION constants */
758 else if ((gtkmm_major_version != GTKMM_MAJOR_VERSION) ||
759 (gtkmm_minor_version != GTKMM_MINOR_VERSION) ||
760 (gtkmm_micro_version != GTKMM_MICRO_VERSION))
762 printf("*** GTK-- header files (version %d.%d.%d) do not match\n",
763 GTKMM_MAJOR_VERSION, GTKMM_MINOR_VERSION, GTKMM_MICRO_VERSION);
764 printf("*** library (version %d.%d.%d)\n",
765 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
770 if ((gtkmm_major_version > major) ||
771 ((gtkmm_major_version == major) && (gtkmm_minor_version > minor)) ||
772 ((gtkmm_major_version == major) && (gtkmm_minor_version == minor) && (gtkmm_micro_version >= micro)))
778 printf("\n*** An old version of GTK-- (%d.%d.%d) was found.\n",
779 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
780 printf("*** You need a version of GTK-- newer than %d.%d.%d. The latest version of\n",
781 major, minor, micro);
782 printf("*** GTK-- is always available from ftp://ftp.gtk.org.\n");
784 printf("*** If you have already installed a sufficiently new version, this error\n");
785 printf("*** probably means that the wrong copy of the gtkmm-config shell script is\n");
786 printf("*** being found. The easiest way to fix this is to remove the old version\n");
787 printf("*** of GTK--, but you can also set the GTKMM_CONFIG environment to point to the\n");
788 printf("*** correct copy of gtkmm-config. (In this case, you will have to\n");
789 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
790 printf("*** so that the correct libraries are found at run-time))\n");
795 ],, no_gtkmm=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
796 CXXFLAGS="$ac_save_CXXFLAGS"
800 if test "x$no_gtkmm" = x ; then
802 ifelse([$2], , :, [$2])
805 if test "$GTKMM_CONFIG" = "no" ; then
806 echo "*** The gtkmm-config script installed by GTK-- could not be found"
807 echo "*** If GTK-- was installed in PREFIX, make sure PREFIX/bin is in"
808 echo "*** your path, or set the GTK_CONFIG environment variable to the"
809 echo "*** full path to gtk-config."
810 echo "*** The gtkmm-config script was not available in GTK-- versions"
811 echo "*** prior to 0.9.12. Perhaps you need to update your installed"
812 echo "*** version to 0.9.12 or later"
814 if test -f conf.gtkmmtest ; then
817 echo "*** Could not run GTK-- test program, checking why..."
818 CXXFLAGS="$CFLAGS $GTKMM_CXXFLAGS"
819 LIBS="$LIBS $GTK___LIBS"
823 ], [ return ((gtkmm_major_version) || (gtkmm_minor_version) || (gtkmm_micro_version)); ],
824 [ echo "*** The test program compiled, but did not run. This usually means"
825 echo "*** that the run-time linker is not finding GTK-- or finding the wrong"
826 echo "*** version of GTK--. If it is not finding GTK--, you'll need to set your"
827 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
828 echo "*** to the installed location Also, make sure you have run ldconfig if that"
829 echo "*** is required on your system"
831 echo "*** If you have an old version installed, it is best to remove it, although"
832 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
833 [ echo "*** The test program failed to compile or link. See the file config.log for the"
834 echo "*** exact error that occured. This usually means GTK-- was incorrectly installed"
835 echo "*** or that you have moved GTK-- since it was installed. In the latter case, you"
836 echo "*** may want to edit the gtkmm-config script: $GTKMM_CONFIG" ])
837 CXXFLAGS="$ac_save_CXXFLAGS"
843 ifelse([$3], , :, [$3])
846 AC_SUBST(GTK___CFLAGS)
851 # Configure paths for GTK--DRAW
852 # Derek Quinn Wyatt 98-08-21 (adapted from Jan Nieuwenhuizen's code)
854 dnl AM_PATH_GTK__DRAW([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
855 dnl Test for GTK--DRAW, and define GTK___CFLAGS and GTK___LIBS
857 AC_DEFUN(AM_PATH_GTK__DRAW,
859 dnl Get the cflags and libraries from the gtk__-config script
861 AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
862 min_gtk___version=ifelse([$1], ,0.0.5,$1)
863 AC_MSG_CHECKING(for GTK--DRAW - version >= $min_gtk___version)
865 if test "$GTKMM_CONFIG" != "no" ; then
866 GTK___CFLAGS=`$GTKMM_CONFIG --cflags`
867 GTK___LIBS=`$GTKMM_CONFIG --libs`
868 GTK___DLIBS="$GTK___LIBS -lgtkmmdraw"
869 GTK___LIBS="$GTK___DLIBS"
870 ac_save_CFLAGS="$CFLAGS"
872 ac_save_CXXFLAGS="$CXXFLAGS"
873 CFLAGS="$CFLAGS $GTK___CFLAGS"
874 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
875 LIBS="$LIBS $GTK___LIBS"
877 dnl Now check if the installed GTK__ is sufficiently new. (Also sanity
878 dnl checks the results of gtk__-config to some extent
890 ],, no_gtk__=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
891 CFLAGS="$ac_save_CFLAGS"
892 CXXFLAGS="$ac_save_CXXFLAGS"
897 if test "x$no_gtk__" = x ; then
899 ifelse([$2], , :, [$2])
904 ifelse([$3], , :, [$3])
906 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
908 AC_SUBST(GTK___CFLAGS)