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
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_GUILE, [
159 # on some systems, -lguile succeeds for guile-1.3
160 # others need readline, dl (or even more)
161 # urg, must check for different functions in libguile
162 # to force new check iso reading from cache
163 AC_CHECK_LIB(guile, scm_shell, \
164 LIBS="-lguile $LIBS"; AC_DEFINE(HAVE_LIBGUILE), \
165 AC_CHECK_LIB(readline, readline) \
166 AC_CHECK_LIB(dl, dlopen) \
167 AC_CHECK_LIB(socket, socket)\
168 AC_CHECK_LIB(termcap,tgetent)\
169 AC_CHECK_LIB(m, fabs)\
170 AC_CHECK_LIB(guile, scm_boot_guile)\
172 if test "$ac_cv_lib_guile_scm_shell" != yes -a \
173 "$ac_cv_lib_guile_scm_boot_guile" != yes ; then
174 AC_STEPMAKE_WARN(You should install guile 1.3 or newer)
178 AC_DEFUN(AC_STEPMAKE_INIT, [
181 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
182 if test x$MY_PATCH_LEVEL != x; then
183 FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
186 # urg: don't "fix" this: irix doesn't know about [:lower:] and [:upper:]
187 changequote(<<, >>)dnl
188 PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
189 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
192 # No versioning on directory names of sub-packages
194 stepmake=${datadir}/stepmake
196 if test "$prefix" = "NONE"; then
197 presome=${ac_default_prefix}
199 stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
201 if test "x$PACKAGE" = "xSTEPMAKE"; then
202 echo Stepmake package!
203 (cd stepmake; rm -f stepmake; ln -s ../stepmake .)
204 (cd stepmake; rm -f bin; ln -s ../bin .)
205 AC_CONFIG_AUX_DIR(bin)
208 echo Package: $PACKAGE
209 # Check for installed stepmake
210 if test -d $stepmake; then
211 echo Using installed stepmake: $stepmake
213 stepmake='$(depth)'/stepmake
214 echo Using local stepmake: $datadir/stepmake not found
217 $HOME/usr/local/share/stepmake/bin\
218 $HOME/usr/local/lib/stepmake/bin\
219 $HOME/usr/share/stepmake/bin\
220 $HOME/usr/lib/stepmake/bin\
221 /usr/local/share/stepmake/bin\
222 /usr/local/lib/stepmake/bin\
223 /usr/share/stepmake/bin\
224 /usr/lib/stepmake/bin\
232 AC_SUBST(PACKAGE_NAME)
233 AC_DEFINE_UNQUOTED(PACKAGE, "${PACKAGE_NAME}")
234 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, "${FULL_VERSION}")
236 package_depth=`dirname $cache_file`
237 AC_SUBST(package_depth)
239 AUTOGENERATE="This file was automatically generated by configure"
240 AC_SUBST(AUTOGENERATE)
241 absolute_builddir="`pwd`"
242 AC_SUBST(absolute_builddir)
244 STATE_VECTOR=`ls make/STATE-VECTOR 2>/dev/null`
245 if test "x$STATE_VECTOR" != "x"; then
246 STATE_VECTOR="\$(depth)/$STATE_VECTOR"
248 AC_SUBST(STATE_VECTOR)
251 AC_ARG_ENABLE(config,
252 [ enable-config=FILE put configure settings in config-FILE.make],
253 [CONFIGSUFFIX=$enableval])
255 if test "$CONFIGSUFFIX" != "" ; then
256 CONFIGFILE=config-$CONFIGSUFFIX
260 AC_SUBST(CONFIGSUFFIX)
263 AC_CHECK_PROGS(MAKE, make, error)
264 AC_CHECK_PROGS(FIND, find, error)
267 dnl system supplied INSTALL is unsafe; use our own install.
269 dnl if test "$INSTALL" = "bin/install-sh"; then
270 dnl export INSTALL="\$\(depth\)/bin/install-sh"
273 AC_CHECK_PROGS(TAR, tar, error)
274 AC_CHECK_PROGS(BASH, bash, /bin/sh)
276 AC_PATH_PROG(PYTHON, ${PYTHON:-python}, -echo no python)
280 AC_CHECK_SEARCH_RESULT($MAKE, GNU make, You should install GNU make)
281 if test $MAKE != "error" ; then
282 $MAKE -v| grep GNU > /dev/null
285 AC_STEPMAKE_WARN(Please install *GNU* make)
289 AC_CHECK_SEARCH_RESULT($PYTHON, python, You should install Python)
291 if test "x$OSTYPE" = "xcygwin32" || test "x$OSTYPE" = "xWindows_NT"; then
292 LN=cp # hard link does not work under cygnus-nt
293 LN_S=cp # symbolic link does not work for native nt
298 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
305 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-sh -c"
312 AC_DEFINE_UNQUOTED(DIRSEP, '${DIRSEP}')
313 AC_DEFINE_UNQUOTED(PATHSEP, '${PATHSEP}')
321 AC_DEFUN(AC_STEPMAKE_LEXYACC, [
322 # ugh, automake: we want (and check for) bison
324 # ugh, automake: we want (and check for) flex
326 # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
330 ac_cv_prog_lex_root=lex.yy
332 AC_CHECK_PROGS(BISON, bison, error)
333 AC_CHECK_PROGS(FLEX, flex, error)
334 AC_CHECK_SEARCH_RESULT($BISON, bison, Please install Bison, 1.25 or newer)
335 AC_CHECK_SEARCH_RESULT($FLEX, flex, Please install Flex, 2.5 or newer)
337 if test $BISON != "error"; then
338 bison_version=`$BISON --version| sed 's/^.*version 1.//g' `
339 if test $bison_version -lt 25; then
340 AC_STEPMAKE_WARN(Your bison is a bit old (1.$bison_version). You might have to install 1.25)
348 AC_DEFUN(AC_STEPMAKE_LIB, [
349 AC_CHECK_PROGS(AR, ar, error)
356 AC_DEFUN(AC_STEPMAKE_LIBTOOL, [
358 # **Never** try to set library version numbers so that they correspond
359 # to the release number of your package. This is an abuse that only
360 # fosters misunderstanding of the purpose of library versions.
362 REVISION=$PATCH_LEVEL
363 # CURRENT=$MINOR_VERSION
364 CURRENT=`expr $MINOR_VERSION + 1`
365 # AGE=$(expr $MAJOR_VERSION + 1)
372 AC_DEFUN(AC_STEPMAKE_LOCALE, [
377 AC_ARG_WITH(localedir,
378 [ with-localedir=LOCALE use LOCALE as locale dir. Default: PREFIX/share/locale ],
379 localedir=$with_localedir,
380 localedir='${prefix}/share/locale')
383 [ with-lang=LANG use LANG as language to emit messages],
387 AC_MSG_CHECKING(language)
389 En* | en* | Am* | am* | US* | us*)
391 NL | nl | Du* | du* | Ned* | ned*)
400 if test "$lang" = "unknown" ; then
401 AC_STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS)
406 AC_DEFUN(AC_STEPMAKE_GETTEXT, [
407 DIR_LOCALEDIR=${localedir}
409 if test "$prefix" = "NONE"; then
410 presome=${ac_default_prefix}
412 DIR_LOCALEDIR=`echo ${DIR_LOCALEDIR} | sed "s!\\\${prefix}!$presome!"`
414 AC_SUBST(DIR_LOCALEDIR)
415 AC_DEFINE_UNQUOTED(DIR_LOCALEDIR, "${DIR_LOCALEDIR}")
417 AC_CHECK_LIB(intl, gettext)
418 AC_CHECK_FUNCS(gettext)
421 AC_DEFUN(AC_STEPMAKE_MAN, [
422 AC_CHECK_PROGS(TROFF, troff, -echo no troff)
425 AC_DEFUN(AC_STEPMAKE_MSGFMT, [
426 # AC_CHECK_PROGS(MSGFMT, msgfmt, -echo no msgfmt)
427 AC_CHECK_PROGS(MSGFMT, msgfmt, \$(SHELL) \$(step-bindir)/fake-msgfmt.sh )
428 AC_MSG_CHECKING(whether msgfmt accepts -o)
429 msgfmt_output="`msgfmt -o bla 2>&1 | grep usage`"
430 if test "$msgfmt_output" = ""; then
434 MSGFMT="\$(SHELL) \$(step-bindir)/fake-msgfmt.sh"
436 AC_STEPMAKE_WARN(please install msgfmt from GNU gettext)
438 if test ! -n "$MSGFMT"; then
439 AC_STEPMAKE_WARN(please install msgfmt from GNU gettext)
443 AC_DEFUN(AC_STEPMAKE_TEXMF_DIRS, [
444 AC_ARG_ENABLE(tex-prefix,
445 [ enable-tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)],
446 [TEXPREFIX=$enableval],
449 AC_ARG_ENABLE(tex-dir,
450 [ enable-tex-dir=DIR set the directory to put $PACKAGE_NAME TeX files in. ],
454 AC_ARG_ENABLE(mf-dir,
455 [ enable-mf-dir=DIR set the directory to put $PACKAGE_NAME MetaFont files in. ],
459 if test "x$TEXPREFIX" = xauto ; then
460 AC_TEX_PREFIX(TEXPREFIX)
462 find_texprefix=$TEXPREFIX
465 if test "x$MFDIR" = xauto; then
469 if test "x$TEXDIR" = xauto ; then
470 AC_TEX_SUBDIR(TEXDIR)
477 AC_DEFUN(AC_STEPMAKE_TEXMF, [
478 # urg, never know what names these teTeX guys will think up
479 AC_CHECK_PROGS(METAFONT, mf, no)
480 if test "x$METAFONT" = "xno"; then
481 AC_CHECK_PROGS(MFONT, mfont, -echo no mf or mfont)
485 AC_CHECK_PROGS(METAPOST, mp, no)
486 if test "x$METAPOST" = "xno"; then
487 AC_CHECK_PROGS(MPOST, mpost, -echo no mp or mpost)
495 AC_DEFUN(AC_STEPMAKE_WARN, [
500 AC_DEFUN(AC_STEPMAKE_YODL, [
501 if test "x$YODL" = "x"; then
502 AC_CHECK_PROGS(STRIPROFF, striproff, -echo no striproff)
503 AC_CHECK_PROGS(YODL, yodl, -echo no yodl)
504 AC_CHECK_PROGS(YODL2HTML, yodl2html, -echo no yodl)
505 AC_CHECK_PROGS(YODL2LATEX, yodl2latex, )
506 AC_CHECK_PROGS(YODL2MAN, yodl2man, -echo no yodl)
507 AC_CHECK_PROGS(YODL2MSLESS, yodl2msless, -echo no yodl)
508 AC_CHECK_PROGS(YODL2TEXINFO, yodl2texinfo, -echo no yodl)
509 AC_CHECK_PROGS(YODL2TXT, yodl2txt, -echo no yodl)
510 YODL2LESS_DIR='$(bindir)/'
516 AC_SUBST(YODL2LESS_DIR)
518 AC_SUBST(YODL2MSLESS)
519 AC_SUBST(YODL2TEXINFO)
521 export STRIPROFF YODL YODL2HTML YODL2LATEX YODL2MAN YODL2MSLESS YODL2TEXINFO YODL2TXT
523 if test "x$YODL" = "-echo no yodl"; then
524 AC_STEPMAKE_WARN(Did not find YODL (Yodl is Yet Oneother Document Language, see http://www.cs.uu.nl/~hanwen/yodl))
528 dnl should cache result.
529 dnl should look in $prefix first.
530 dnl should probably assume TDS
532 AC_DEFUN(AC_TEX_PREFIX, [
535 AC_MSG_CHECKING(TeX/MF root dir directory)
537 find_root_prefix="$prefix"
540 test "x$find_root_prefix" = xNONE && find_root_prefix="$ac_default_prefix"
542 for postfix in "/lib/tex/" "/lib/texmf" "/lib" "/tex" "/texmf"; do
543 find_texprefix="$find_root_prefix$postfix"
544 if test -d $find_texprefix; then
545 find_texpostfix=$postfix
550 if test "x$find_texpostfix" = x; then
551 find_texpostfix='/lib/texmf/tex'
552 AC_STEPMAKE_WARN(Cannot determine the TeX-directory. Please use --enable-tex-prefix)
555 find_texprefix="$find_root_prefix/$find_texpostfix"
557 # only assign if variablename not empty
558 if test x != "x[$]$1"; then
559 $1='${prefix}'/"$find_texpostfix"
561 AC_MSG_RESULT($find_texprefix)
566 # find a directory inside a prefix,
567 # $1 the prefix (expanded version)
568 # $2 variable to assign
569 # $3 the directory name
571 AC_DEFUN(AC_FIND_DIR_IN_PREFIX, [
573 AC_MSG_CHECKING($4 directory)
575 $FIND ./ -type d -a -name $3 -print |sort|head -1|sed 's#^\./##')`
578 if test "x$find_dirdir" = x; then
580 AC_STEPMAKE_WARN(Cannot determine $4 subdirectory. Please set from command-line)
584 AC_MSG_RESULT($1/$find_dirdir)
587 # ugh. this is hopeless
588 AC_DEFUN(AC_KPSE_TEX_DIR, [
589 kpse_paths=`(kpsepath -n latex tex; kpsepath -n tex tex) | sed 's/:/ /g' | tr ' ' '\012' |sort | uniq -d`
590 kpse_syspaths=`echo $kpse_paths | grep '!'| sed 's/!//g'`
592 if test -w "$kpse_syspaths";
594 dir=`echo $kpse_syspaths | head -1`
596 dir=`echo $kpse_paths | grep -v '!'| head -1`
598 if test "$prefix" = "NONE"; then
599 local_prefix=$ac_default_prefix
600 local_prefix_quote='${prefix}'
604 local_prefix_quote=$prefix
606 echo $local_prefix_quote = $local_prefix
608 echo $dir | sed 's!'$local_prefix'!\$local_prefix_quote!g'
611 AC_DEFUN(AC_TEX_SUBDIR, [
612 dnl AC_REQUIRE([AC_TEX_PREFIX])
613 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, tex,TeX input)
617 AC_DEFUN(AC_MF_SUBDIR, [
618 dnl AC_REQUIRE([AC_TEX_PREFIX])
619 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, source, MF input)
623 AC_DEFUN(AC_CHECK_SEARCH_RESULT, [
624 result="`echo \"$1\" | grep echo`"
625 if test "x$1" = "xerror" -o "x$result" != "x"; then
626 AC_STEPMAKE_WARN(can\'t find $2. $3)
631 # Configure paths for GTK+
632 # Owen Taylor 97-11-3
634 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
635 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
637 AC_DEFUN(AM_PATH_GTK,
639 dnl Get the cflags and libraries from the gtk-config script
641 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
642 min_gtk_version=ifelse([$1], ,1.1.1,$1)
643 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
645 if test "$GTK_CONFIG" != "no" ; then
646 GTK_CFLAGS=`$GTK_CONFIG --cflags`
647 GTK_LIBS=`$GTK_CONFIG --libs`
648 ac_save_CFLAGS="$CFLAGS"
650 ac_save_CXXFLAGS="$CXXFLAGS"
651 CFLAGS="$CFLAGS $GTK_CFLAGS"
652 CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
653 LIBS="$LIBS $GTK_LIBS"
655 dnl Now check if the installed GTK is sufficiently new. (Also sanity
656 dnl checks the results of gtk-config to some extent
665 int major, minor, micro;
667 if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) {
668 printf("%s, bad version string\n", "$min_gtk_version");
672 return !((gtk_major_version > major) ||
673 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
674 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)));
676 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
677 CFLAGS="$ac_save_CFLAGS"
678 CXXFLAGS="$ac_save_CXXFLAGS"
683 if test "x$no_gtk" = x ; then
685 ifelse([$2], , :, [$2])
690 ifelse([$3], , :, [$3])
692 CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
699 # Configure paths for GTK--
700 # Erik Andersen 30 May 1998
701 # Modified by Tero Pulkkinen (added the compiler checks... I hope they work..)
703 dnl Test for GTK__, and define GTK___CFLAGS and GTK___LIBS
704 dnl to be used as follows:
705 dnl AM_PATH_GTKMM([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
708 dnl Get the cflags and libraries from the gtkmm-config script
710 AC_ARG_WITH(gtkmm-prefix,[ --with-gtkmm-prefix=PREFIX
711 Prefix where GTK-- is installed (optional)],
712 gtkmm_config_prefix="$withval", gtkmm_config_prefix="")
713 AC_ARG_WITH(gtkmm-exec-prefix,[ --with-gtkmm-exec-prefix=PREFIX
714 Exec prefix where GTK-- is installed (optional)],
715 gtkmm_config_exec_prefix="$withval", gtkmm_config_exec_prefix="")
716 AC_ARG_ENABLE(gtkmmtest, [ --disable-gtkmmtest Do not try to compile and run a test GTK-- program],
717 , enable_gtkmmtest=yes)
719 if test x$gtkmm_config_exec_prefix != x ; then
720 gtkmm_config_args="$gtkmm_config_args --exec-prefix=$gtkmm_config_exec_prefix"
721 if test x${GTKMM_CONFIG+set} != xset ; then
722 GTKMM_CONFIG=$gtkmm_config_exec_prefix/bin/gtkmm-config
725 if test x$gtkmm_config_prefix != x ; then
726 gtkmm_config_args="$gtkmm_config_args --prefix=$gtkmm_config_prefix"
727 if test x${GTKMM_CONFIG+set} != xset ; then
728 GTKMM_CONFIG=$gtkmm_config_prefix/bin/gtkmm-config
733 AC_DEFUN(AM_PATH_GTKMM,
737 dnl Check check if the installed GTK-- is sufficiently new.
739 AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
740 min_gtkmm_version=ifelse([$1], ,0.9.14,$1)
742 AC_MSG_CHECKING(for GTK-- - version >= $min_gtkmm_version)
744 if test "$GTKMM_CONFIG" = "no" ; then
750 GTK___CFLAGS=`$GTKMM_CONFIG $gtkmm_config_args --cflags`
751 GTK___LIBS=`$GTKMM_CONFIG $gtkmm_config_args --libs`
752 gtkmm_config_major_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
753 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
754 gtkmm_config_minor_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
755 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
756 gtkmm_config_micro_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
757 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
758 if test "x$enable_gtkmmtest" = "xyes" ; then
759 ac_save_CXXFLAGS="$CXXFLAGS"
761 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
762 LIBS="$LIBS $GTK___LIBS"
764 dnl Now check if the installed GTK-- is sufficiently new. (Also sanity
765 dnl checks the results of gtkmm-config to some extent
776 int major, minor, micro;
779 system ("touch conf.gtkmmtest");
781 /* HP/UX 0 (%@#!) writes to sscanf strings */
782 tmp_version = g_strdup("$min_gtkmm_version");
783 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
784 printf("%s, bad version string\n", "$min_gtkmm_version");
788 if ((gtkmm_major_version != $gtkmm_config_major_version) ||
789 (gtkmm_minor_version != $gtkmm_config_minor_version) ||
790 (gtkmm_micro_version != $gtkmm_config_micro_version))
792 printf("\n*** 'gtkmm-config --version' returned %d.%d.%d, but GTK-- (%d.%d.%d)\n",
793 $gtkmm_config_major_version, $gtkmm_config_minor_version, $gtkmm_config_micro_version,
794 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
795 printf ("*** was found! If gtkmm-config was correct, then it is best\n");
796 printf ("*** to remove the old version of GTK--. You may also be able to fix the error\n");
797 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
798 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
799 printf("*** required on your system.\n");
800 printf("*** If gtkmm-config was wrong, set the environment variable GTKMM_CONFIG\n");
801 printf("*** to point to the correct copy of gtkmm-config, and remove the file config.cache\n");
802 printf("*** before re-running configure\n");
804 /* GTK-- does not have the GTKMM_*_VERSION constants */
806 else if ((gtkmm_major_version != GTKMM_MAJOR_VERSION) ||
807 (gtkmm_minor_version != GTKMM_MINOR_VERSION) ||
808 (gtkmm_micro_version != GTKMM_MICRO_VERSION))
810 printf("*** GTK-- header files (version %d.%d.%d) do not match\n",
811 GTKMM_MAJOR_VERSION, GTKMM_MINOR_VERSION, GTKMM_MICRO_VERSION);
812 printf("*** library (version %d.%d.%d)\n",
813 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
818 if ((gtkmm_major_version > major) ||
819 ((gtkmm_major_version == major) && (gtkmm_minor_version > minor)) ||
820 ((gtkmm_major_version == major) && (gtkmm_minor_version == minor) && (gtkmm_micro_version >= micro)))
826 printf("\n*** An old version of GTK-- (%d.%d.%d) was found.\n",
827 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
828 printf("*** You need a version of GTK-- newer than %d.%d.%d. The latest version of\n",
829 major, minor, micro);
830 printf("*** GTK-- is always available from ftp://ftp.gtk.org.\n");
832 printf("*** If you have already installed a sufficiently new version, this error\n");
833 printf("*** probably means that the wrong copy of the gtkmm-config shell script is\n");
834 printf("*** being found. The easiest way to fix this is to remove the old version\n");
835 printf("*** of GTK--, but you can also set the GTKMM_CONFIG environment to point to the\n");
836 printf("*** correct copy of gtkmm-config. (In this case, you will have to\n");
837 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
838 printf("*** so that the correct libraries are found at run-time))\n");
843 ],, no_gtkmm=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
844 CXXFLAGS="$ac_save_CXXFLAGS"
848 if test "x$no_gtkmm" = x ; then
850 ifelse([$2], , :, [$2])
853 if test "$GTKMM_CONFIG" = "no" ; then
854 echo "*** The gtkmm-config script installed by GTK-- could not be found"
855 echo "*** If GTK-- was installed in PREFIX, make sure PREFIX/bin is in"
856 echo "*** your path, or set the GTK_CONFIG environment variable to the"
857 echo "*** full path to gtk-config."
858 echo "*** The gtkmm-config script was not available in GTK-- versions"
859 echo "*** prior to 0.9.12. Perhaps you need to update your installed"
860 echo "*** version to 0.9.12 or newer"
862 if test -f conf.gtkmmtest ; then
865 echo "*** Could not run GTK-- test program, checking why..."
866 CXXFLAGS="$CFLAGS $GTKMM_CXXFLAGS"
867 LIBS="$LIBS $GTK___LIBS"
871 ], [ return ((gtkmm_major_version) || (gtkmm_minor_version) || (gtkmm_micro_version)); ],
872 [ echo "*** The test program compiled, but did not run. This usually means"
873 echo "*** that the run-time linker is not finding GTK-- or finding the wrong"
874 echo "*** version of GTK--. If it is not finding GTK--, you'll need to set your"
875 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
876 echo "*** to the installed location Also, make sure you have run ldconfig if that"
877 echo "*** is required on your system"
879 echo "*** If you have an old version installed, it is best to remove it, although"
880 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
881 [ echo "*** The test program failed to compile or link. See the file config.log for the"
882 echo "*** exact error that occured. This usually means GTK-- was incorrectly installed"
883 echo "*** or that you have moved GTK-- since it was installed. In the latter case, you"
884 echo "*** may want to edit the gtkmm-config script: $GTKMM_CONFIG" ])
885 CXXFLAGS="$ac_save_CXXFLAGS"
891 ifelse([$3], , :, [$3])
894 AC_SUBST(GTK___CFLAGS)
899 # Configure paths for GTK--DRAW
900 # Derek Quinn Wyatt 98-08-21 (adapted from Jan Nieuwenhuizen's code)
902 dnl AM_PATH_GTK__DRAW([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
903 dnl Test for GTK--DRAW, and define GTK___CFLAGS and GTK___LIBS
905 AC_DEFUN(AM_PATH_GTK__DRAW,
907 dnl Get the cflags and libraries from the gtk__-config script
909 AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
910 min_gtk___version=ifelse([$1], ,0.0.5,$1)
911 AC_MSG_CHECKING(for GTK--DRAW - version >= $min_gtk___version)
913 if test "$GTKMM_CONFIG" != "no" ; then
914 GTK___CFLAGS=`$GTKMM_CONFIG --cflags`
915 GTK___LIBS=`$GTKMM_CONFIG --libs`
916 GTK___DLIBS="$GTK___LIBS -lgtkmmdraw"
917 GTK___LIBS="$GTK___DLIBS"
918 ac_save_CFLAGS="$CFLAGS"
920 ac_save_CXXFLAGS="$CXXFLAGS"
921 CFLAGS="$CFLAGS $GTK___CFLAGS"
922 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
923 LIBS="$LIBS $GTK___LIBS"
925 dnl Now check if the installed GTK__ is sufficiently new. (Also sanity
926 dnl checks the results of gtk__-config to some extent
938 ],, no_gtk__=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
939 CFLAGS="$ac_save_CFLAGS"
940 CXXFLAGS="$ac_save_CXXFLAGS"
945 if test "x$no_gtk__" = x ; then
947 ifelse([$2], , :, [$2])
952 ifelse([$3], , :, [$3])
954 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
956 AC_SUBST(GTK___CFLAGS)