1 dnl WARNING WARNING WARNING WARNING
2 dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
3 dnl WARNING WARNING WARNING WARNING
4 dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
5 dnl WARNING WARNING WARNING WARNING
6 dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
7 dnl aclocal.m4 -*-shell-script-*-
8 dnl StepMake subroutines for configure.in
10 AC_DEFUN(AC_STEPMAKE_COMPILE, [
11 # -O is necessary to get inlining
13 CXXFLAGS=${CXXFLAGS:-""}
20 AC_ARG_ENABLE(checking,
21 [ enable-checking set runtime checks (assert calls). Default: on],
22 [checking_b=$enableval] )
24 # actually, the default is: tja='-O' to get inlining...
27 #actually, that sucks.
28 # tja looks like a typo. Default is optimisation off. --hwn
30 AC_ARG_ENABLE(optimise,
31 [ enable-optimise use maximal speed optimisations. Default: off],
32 [optimise_b=$enableval])
34 AC_ARG_ENABLE(profiling,
35 [ enable-profiling compile with gprof support. Default: off],
36 [profile_b=$enableval])
38 AC_ARG_ENABLE(debugging,
39 [ enable-debugging set debug info. Default: on],
42 AC_ARG_ENABLE(mingw-prefix,
43 [ enable-mingw-prefix=DIR set the mingw32 directory (standalone windows32 exes)],
44 [MINGWPREFIX=$enableval],
47 if test "$printing_b" = no; then
50 DEFINES="$DEFINES -DNPRINT"
53 if test "$checking_b" = no; then
56 DEFINES="$DEFINES -DNDEBUG"
59 if test "$optimise_b" = yes; then
60 OPTIMIZE="-O2 -finline-functions"
63 if test "$optimise_b" = no; then
67 if test $profile_b = yes; then
69 OPTIMIZE="$OPTIMIZE -pg"
72 if test $debug_b = yes; then
73 OPTIMIZE="$OPTIMIZE -g"
76 # however, C++ support in mingw32 v 0.1.4 is still flaky
77 if test x$MINGWPREFIX != xno; then
78 ICFLAGS="-I$MINGWPREFIX/include"
79 ILDFLAGS="-$MINGWPREFIX/lib"
86 CPPFLAGS=${CPPFLAGS:-""}
95 AC_DEFUN(AC_STEPMAKE_CXX, [
99 AC_CHECK_HEADER(FlexLexer.h, true,
100 AC_STEPMAKE_WARN(can"\'"t find flex header. Please install Flex headers correctly))
102 CPPFLAGS="$CPPFLAGS $DEFINES"
103 CXXFLAGS="$CXXFLAGS $OPTIMIZE"
112 AC_DEFUN(AC_STEPMAKE_CXXTEMPLATE, [
113 AC_CACHE_CHECK([whether explicit instantiation is needed],
114 lily_cv_need_explicit_instantiation,
116 template <class T> struct foo { static int baz; };
117 template <class T> int foo<T>::baz = 1;
118 ], [ return foo<int>::baz; ],
119 lily_cv_need_explicit_instantiation=no,
120 lily_cv_need_explicit_instantiation=yes))
121 if test x"$lily_cv_need_explicit_instantiation"x = x"yes"x; then
122 AC_DEFINE(NEED_EXPLICIT_INSTANTIATION)
126 AC_DEFUN(AC_STEPMAKE_DATADIR, [
127 if test "$datadir" = "\${prefix}/share"; then
128 datadir='${prefix}/share/'$package
130 DIR_DATADIR=${datadir}
132 if test "$prefix" = "NONE"; then
133 presome=${ac_default_prefix}
135 DIR_DATADIR=`echo ${DIR_DATADIR} | sed "s!\\\${prefix}!$presome!"`
137 AC_SUBST(DIR_DATADIR)
138 AC_DEFINE_UNQUOTED(DIR_DATADIR, "${DIR_DATADIR}")
141 AC_DEFUN(AC_STEPMAKE_END, [
142 AC_OUTPUT($CONFIGFILE.make:config.make.in)
145 cp make/toplevel.make.in ./GNUmakefile
146 chmod 444 GNUmakefile
149 AC_DEFUN(AC_STEPMAKE_GXX, [
151 changequote(<<, >>)dnl
152 if $CXX --version | grep '2\.8' > /dev/null ||
153 $CXX --version | grep 'egcs' > /dev/null
158 AC_STEPMAKE_WARN(can\'t find g++ 2.8 or egcs)
162 AC_DEFUN(AC_STEPMAKE_GUILE, [
163 # on some systems, -lguile succeeds for guile-1.3
164 # others need readline, dl (or even more)
165 # urg, must check for different functions in libguile
166 # to force new check iso reading from cache
168 # gh_scm2doubles,gh_doubles2scm are new in 1.3
169 AC_CHECK_LIB(guile, gh_scm2doubles, \
170 LIBS="-lguile $LIBS"; AC_DEFINE(HAVE_LIBGUILE), \
171 AC_CHECK_LIB(readline, readline) \
172 AC_CHECK_LIB(dl, dlopen) \
173 AC_CHECK_LIB(socket, socket)\
174 AC_CHECK_LIB(termcap,tgetent)\
175 AC_CHECK_LIB(m, fabs)\
176 AC_CHECK_LIB(guile, gh_doubles2scm)\
178 if test "$ac_cv_lib_guile_gh_scm2doubles" != yes -a \
179 "$ac_cv_lib_guile_gh_doubles2scm" != yes ; then
180 AC_STEPMAKE_WARN(You should install guile 1.3 or newer)
184 AC_DEFUN(AC_STEPMAKE_INIT, [
187 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
188 if test x$MY_PATCH_LEVEL != x; then
189 FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
192 # urg: don't "fix" this: irix doesn't know about [:lower:] and [:upper:]
193 changequote(<<, >>)dnl
194 PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
195 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
198 # No versioning on directory names of sub-packages
200 stepmake=${datadir}/stepmake
202 if test "$prefix" = "NONE"; then
203 presome=${ac_default_prefix}
205 stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
207 if test "x$PACKAGE" = "xSTEPMAKE"; then
208 echo Stepmake package!
209 (cd stepmake; rm -f stepmake; ln -s ../stepmake .)
210 (cd stepmake; rm -f bin; ln -s ../bin .)
211 AC_CONFIG_AUX_DIR(bin)
214 echo Package: $PACKAGE
215 # Check for installed stepmake
216 if test -d $stepmake; then
217 echo Using installed stepmake: $stepmake
219 stepmake='$(depth)'/stepmake
220 echo Using local stepmake: $datadir/stepmake not found
223 $HOME/usr/local/share/stepmake/bin\
224 $HOME/usr/local/lib/stepmake/bin\
225 $HOME/usr/share/stepmake/bin\
226 $HOME/usr/lib/stepmake/bin\
227 /usr/local/share/stepmake/bin\
228 /usr/local/lib/stepmake/bin\
229 /usr/share/stepmake/bin\
230 /usr/lib/stepmake/bin\
238 AC_SUBST(PACKAGE_NAME)
239 AC_DEFINE_UNQUOTED(PACKAGE, "${PACKAGE_NAME}")
240 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, "${FULL_VERSION}")
242 package_depth=`dirname $cache_file`
243 AC_SUBST(package_depth)
245 AUTOGENERATE="This file was automatically generated by configure"
246 AC_SUBST(AUTOGENERATE)
247 absolute_builddir="`pwd`"
248 AC_SUBST(absolute_builddir)
250 STATE_VECTOR=`ls make/STATE-VECTOR 2>/dev/null`
251 if test "x$STATE_VECTOR" != "x"; then
252 STATE_VECTOR="\$(depth)/$STATE_VECTOR"
254 AC_SUBST(STATE_VECTOR)
257 AC_ARG_ENABLE(config,
258 [ enable-config=FILE put configure settings in config-FILE.make],
259 [CONFIGSUFFIX=$enableval])
261 if test "$CONFIGSUFFIX" != "" ; then
262 CONFIGFILE=config-$CONFIGSUFFIX
266 AC_SUBST(CONFIGSUFFIX)
269 AC_CHECK_PROGS(MAKE, make, error)
270 AC_CHECK_PROGS(FIND, find, error)
273 dnl system supplied INSTALL is unsafe; use our own install.
275 dnl if test "$INSTALL" = "bin/install-sh"; then
276 dnl export INSTALL="\$\(depth\)/bin/install-sh"
279 AC_CHECK_PROGS(TAR, tar, error)
280 AC_CHECK_PROGS(BASH, bash, /bin/sh)
282 AC_PATH_PROG(PYTHON, ${PYTHON:-python}, -echo no python)
286 AC_CHECK_SEARCH_RESULT($MAKE, GNU make, You should install GNU make)
287 if test $MAKE != "error" ; then
288 $MAKE -v| grep GNU > /dev/null
291 AC_STEPMAKE_WARN(Please install *GNU* make)
295 AC_CHECK_SEARCH_RESULT($PYTHON, python, You should install Python)
297 if test "x$OSTYPE" = "xcygwin32" || test "x$OSTYPE" = "xWindows_NT"; then
298 LN=cp # hard link does not work under cygnus-nt
299 LN_S=cp # symbolic link does not work for native nt
304 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
311 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-sh -c"
318 AC_DEFINE_UNQUOTED(DIRSEP, '${DIRSEP}')
319 AC_DEFINE_UNQUOTED(PATHSEP, '${PATHSEP}')
327 AC_DEFUN(AC_STEPMAKE_LEXYACC, [
328 # ugh, automake: we want (and check for) bison
330 # ugh, automake: we want (and check for) flex
332 # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
336 ac_cv_prog_lex_root=lex.yy
338 AC_CHECK_PROGS(BISON, bison, error)
339 AC_CHECK_PROGS(FLEX, flex, error)
340 AC_CHECK_SEARCH_RESULT($BISON, bison, Please install Bison, 1.25 or newer)
341 AC_CHECK_SEARCH_RESULT($FLEX, flex, Please install Flex, 2.5 or newer)
343 if test $BISON != "error"; then
344 bison_version=`$BISON --version| sed 's/^.*version 1.//g' `
345 if test $bison_version -lt 25; then
346 AC_STEPMAKE_WARN(Your bison is a bit old (1.$bison_version). You might have to install 1.25)
354 AC_DEFUN(AC_STEPMAKE_LIB, [
355 AC_CHECK_PROGS(AR, ar, error)
362 AC_DEFUN(AC_STEPMAKE_LIBTOOL, [
364 # **Never** try to set library version numbers so that they correspond
365 # to the release number of your package. This is an abuse that only
366 # fosters misunderstanding of the purpose of library versions.
368 REVISION=$PATCH_LEVEL
369 # CURRENT=$MINOR_VERSION
370 CURRENT=`expr $MINOR_VERSION + 1`
371 # AGE=$(expr $MAJOR_VERSION + 1)
378 AC_DEFUN(AC_STEPMAKE_LOCALE, [
383 AC_ARG_WITH(localedir,
384 [ with-localedir=LOCALE use LOCALE as locale dir. Default: PREFIX/share/locale ],
385 localedir=$with_localedir,
386 localedir='${prefix}/share/locale')
389 [ with-lang=LANG use LANG as language to emit messages],
393 AC_MSG_CHECKING(language)
395 En* | en* | Am* | am* | US* | us*)
397 NL | nl | Du* | du* | Ned* | ned*)
406 if test "$lang" = "unknown" ; then
407 AC_STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS)
412 AC_DEFUN(AC_STEPMAKE_GETTEXT, [
413 DIR_LOCALEDIR=${localedir}
415 if test "$prefix" = "NONE"; then
416 presome=${ac_default_prefix}
418 DIR_LOCALEDIR=`echo ${DIR_LOCALEDIR} | sed "s!\\\${prefix}!$presome!"`
420 AC_SUBST(DIR_LOCALEDIR)
421 AC_DEFINE_UNQUOTED(DIR_LOCALEDIR, "${DIR_LOCALEDIR}")
423 AC_CHECK_LIB(intl, gettext)
424 AC_CHECK_FUNCS(gettext)
427 AC_DEFUN(AC_STEPMAKE_MAN, [
428 AC_CHECK_PROGS(TROFF, troff, -echo no troff)
431 AC_DEFUN(AC_STEPMAKE_MSGFMT, [
432 # AC_CHECK_PROGS(MSGFMT, msgfmt, -echo no msgfmt)
433 AC_CHECK_PROGS(MSGFMT, msgfmt, \$(SHELL) \$(step-bindir)/fake-msgfmt.sh )
434 AC_MSG_CHECKING(whether msgfmt accepts -o)
435 msgfmt_output="`msgfmt -o bla 2>&1 | grep usage`"
436 if test "$msgfmt_output" = ""; then
440 MSGFMT="\$(SHELL) \$(step-bindir)/fake-msgfmt.sh"
442 AC_STEPMAKE_WARN(please install msgfmt from GNU gettext)
444 if test ! -n "$MSGFMT"; then
445 AC_STEPMAKE_WARN(please install msgfmt from GNU gettext)
449 AC_DEFUN(AC_STEPMAKE_TEXMF_DIRS, [
450 AC_ARG_ENABLE(tex-prefix,
451 [ enable-tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)],
452 [TEXPREFIX=$enableval],
455 AC_ARG_ENABLE(tex-dir,
456 [ enable-tex-dir=DIR set the directory to put $PACKAGE_NAME TeX files in. ],
460 AC_ARG_ENABLE(mf-dir,
461 [ enable-mf-dir=DIR set the directory to put $PACKAGE_NAME MetaFont files in. ],
465 if test "x$TEXPREFIX" = xauto ; then
466 AC_TEX_PREFIX(TEXPREFIX)
468 find_texprefix=$TEXPREFIX
471 if test "x$MFDIR" = xauto; then
475 if test "x$TEXDIR" = xauto ; then
476 AC_TEX_SUBDIR(TEXDIR)
483 AC_DEFUN(AC_STEPMAKE_TEXMF, [
484 # urg, never know what names these teTeX guys will think up
485 AC_CHECK_PROGS(METAFONT, mf, no)
486 if test "x$METAFONT" = "xno"; then
487 AC_CHECK_PROGS(MFONT, mfont, -echo no mf or mfont)
491 AC_CHECK_PROGS(METAPOST, mp, no)
492 if test "x$METAPOST" = "xno"; then
493 AC_CHECK_PROGS(MPOST, mpost, -echo no mp or mpost)
501 AC_DEFUN(AC_STEPMAKE_WARN, [
506 AC_DEFUN(AC_STEPMAKE_YODL, [
507 if test "x$YODL" = "x"; then
508 AC_CHECK_PROGS(STRIPROFF, striproff, -echo no striproff)
509 AC_CHECK_PROGS(YODL, yodl, -echo no yodl)
510 AC_CHECK_PROGS(YODL2HTML, yodl2html, -echo no yodl)
511 AC_CHECK_PROGS(YODL2LATEX, yodl2latex, )
512 AC_CHECK_PROGS(YODL2MAN, yodl2man, -echo no yodl)
513 AC_CHECK_PROGS(YODL2MSLESS, yodl2msless, -echo no yodl)
514 AC_CHECK_PROGS(YODL2TEXINFO, yodl2texinfo, -echo no yodl)
515 AC_CHECK_PROGS(YODL2TXT, yodl2txt, -echo no yodl)
516 YODL2LESS_DIR='$(bindir)/'
522 AC_SUBST(YODL2LESS_DIR)
524 AC_SUBST(YODL2MSLESS)
525 AC_SUBST(YODL2TEXINFO)
527 export STRIPROFF YODL YODL2HTML YODL2LATEX YODL2MAN YODL2MSLESS YODL2TEXINFO YODL2TXT
529 if test "x$YODL" = "-echo no yodl"; then
530 AC_STEPMAKE_WARN(Did not find YODL (Yodl is Yet Oneother Document Language, see http://www.cs.uu.nl/~hanwen/yodl))
534 dnl should cache result.
535 dnl should look in $prefix first.
536 dnl should probably assume TDS
538 AC_DEFUN(AC_TEX_PREFIX, [
541 AC_MSG_CHECKING(TeX/MF root dir directory)
543 find_root_prefix="$prefix"
546 test "x$find_root_prefix" = xNONE && find_root_prefix="$ac_default_prefix"
548 for postfix in "/lib/tex/" "/lib/texmf" "/lib" "/tex" "/texmf"; do
549 find_texprefix="$find_root_prefix$postfix"
550 if test -d $find_texprefix; then
551 find_texpostfix=$postfix
556 if test "x$find_texpostfix" = x; then
557 find_texpostfix='/lib/texmf/tex'
558 AC_STEPMAKE_WARN(Cannot determine the TeX-directory. Please use --enable-tex-prefix)
561 find_texprefix="$find_root_prefix/$find_texpostfix"
563 # only assign if variablename not empty
564 if test x != "x[$]$1"; then
565 $1='${prefix}'/"$find_texpostfix"
567 AC_MSG_RESULT($find_texprefix)
572 # find a directory inside a prefix,
573 # $1 the prefix (expanded version)
574 # $2 variable to assign
575 # $3 the directory name
577 AC_DEFUN(AC_FIND_DIR_IN_PREFIX, [
579 AC_MSG_CHECKING($4 directory)
581 $FIND ./ -type d -a -name $3 -print |sort|head -1|sed 's#^\./##')`
584 if test "x$find_dirdir" = x; then
586 AC_STEPMAKE_WARN(Cannot determine $4 subdirectory. Please set from command-line)
590 AC_MSG_RESULT($1/$find_dirdir)
593 # ugh. this is hopeless
594 AC_DEFUN(AC_KPSE_TEX_DIR, [
595 kpse_paths=`(kpsepath -n latex tex; kpsepath -n tex tex) | sed 's/:/ /g' | tr ' ' '\012' |sort | uniq -d`
596 kpse_syspaths=`echo $kpse_paths | grep '!'| sed 's/!//g'`
598 if test -w "$kpse_syspaths";
600 dir=`echo $kpse_syspaths | head -1`
602 dir=`echo $kpse_paths | grep -v '!'| head -1`
604 if test "$prefix" = "NONE"; then
605 local_prefix=$ac_default_prefix
606 local_prefix_quote='${prefix}'
610 local_prefix_quote=$prefix
612 echo $local_prefix_quote = $local_prefix
614 echo $dir | sed 's!'$local_prefix'!\$local_prefix_quote!g'
617 AC_DEFUN(AC_TEX_SUBDIR, [
618 dnl AC_REQUIRE([AC_TEX_PREFIX])
619 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, tex,TeX input)
623 AC_DEFUN(AC_MF_SUBDIR, [
624 dnl AC_REQUIRE([AC_TEX_PREFIX])
625 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, source, MF input)
629 AC_DEFUN(AC_CHECK_SEARCH_RESULT, [
630 result="`echo \"$1\" | grep echo`"
631 if test "x$1" = "xerror" -o "x$result" != "x"; then
632 AC_STEPMAKE_WARN(can\'t find $2. $3)
637 # Configure paths for GTK+
638 # Owen Taylor 97-11-3
640 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
641 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
643 AC_DEFUN(AM_PATH_GTK,
645 dnl Get the cflags and libraries from the gtk-config script
647 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
648 min_gtk_version=ifelse([$1], ,1.1.1,$1)
649 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
651 if test "$GTK_CONFIG" != "no" ; then
652 GTK_CFLAGS=`$GTK_CONFIG --cflags`
653 GTK_LIBS=`$GTK_CONFIG --libs`
654 ac_save_CFLAGS="$CFLAGS"
656 ac_save_CXXFLAGS="$CXXFLAGS"
657 CFLAGS="$CFLAGS $GTK_CFLAGS"
658 CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
659 LIBS="$LIBS $GTK_LIBS"
661 dnl Now check if the installed GTK is sufficiently new. (Also sanity
662 dnl checks the results of gtk-config to some extent
671 int major, minor, micro;
673 if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) {
674 printf("%s, bad version string\n", "$min_gtk_version");
678 return !((gtk_major_version > major) ||
679 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
680 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)));
682 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
683 CFLAGS="$ac_save_CFLAGS"
684 CXXFLAGS="$ac_save_CXXFLAGS"
689 if test "x$no_gtk" = x ; then
691 ifelse([$2], , :, [$2])
696 ifelse([$3], , :, [$3])
698 CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
705 # Configure paths for GTK--
706 # Erik Andersen 30 May 1998
707 # Modified by Tero Pulkkinen (added the compiler checks... I hope they work..)
709 dnl Test for GTK__, and define GTK___CFLAGS and GTK___LIBS
710 dnl to be used as follows:
711 dnl AM_PATH_GTKMM([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
714 dnl Get the cflags and libraries from the gtkmm-config script
716 AC_ARG_WITH(gtkmm-prefix,[ --with-gtkmm-prefix=PREFIX
717 Prefix where GTK-- is installed (optional)],
718 gtkmm_config_prefix="$withval", gtkmm_config_prefix="")
719 AC_ARG_WITH(gtkmm-exec-prefix,[ --with-gtkmm-exec-prefix=PREFIX
720 Exec prefix where GTK-- is installed (optional)],
721 gtkmm_config_exec_prefix="$withval", gtkmm_config_exec_prefix="")
722 AC_ARG_ENABLE(gtkmmtest, [ --disable-gtkmmtest Do not try to compile and run a test GTK-- program],
723 , enable_gtkmmtest=yes)
725 if test x$gtkmm_config_exec_prefix != x ; then
726 gtkmm_config_args="$gtkmm_config_args --exec-prefix=$gtkmm_config_exec_prefix"
727 if test x${GTKMM_CONFIG+set} != xset ; then
728 GTKMM_CONFIG=$gtkmm_config_exec_prefix/bin/gtkmm-config
731 if test x$gtkmm_config_prefix != x ; then
732 gtkmm_config_args="$gtkmm_config_args --prefix=$gtkmm_config_prefix"
733 if test x${GTKMM_CONFIG+set} != xset ; then
734 GTKMM_CONFIG=$gtkmm_config_prefix/bin/gtkmm-config
739 AC_DEFUN(AM_PATH_GTKMM,
743 dnl Check check if the installed GTK-- is sufficiently new.
745 AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
746 min_gtkmm_version=ifelse([$1], ,0.9.14,$1)
748 AC_MSG_CHECKING(for GTK-- - version >= $min_gtkmm_version)
750 if test "$GTKMM_CONFIG" = "no" ; then
756 GTK___CFLAGS=`$GTKMM_CONFIG $gtkmm_config_args --cflags`
757 GTK___LIBS=`$GTKMM_CONFIG $gtkmm_config_args --libs`
758 gtkmm_config_major_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
759 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
760 gtkmm_config_minor_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
761 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
762 gtkmm_config_micro_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
763 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
764 if test "x$enable_gtkmmtest" = "xyes" ; then
765 ac_save_CXXFLAGS="$CXXFLAGS"
767 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
768 LIBS="$LIBS $GTK___LIBS"
770 dnl Now check if the installed GTK-- is sufficiently new. (Also sanity
771 dnl checks the results of gtkmm-config to some extent
782 int major, minor, micro;
785 system ("touch conf.gtkmmtest");
787 /* HP/UX 0 (%@#!) writes to sscanf strings */
788 tmp_version = g_strdup("$min_gtkmm_version");
789 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
790 printf("%s, bad version string\n", "$min_gtkmm_version");
794 if ((gtkmm_major_version != $gtkmm_config_major_version) ||
795 (gtkmm_minor_version != $gtkmm_config_minor_version) ||
796 (gtkmm_micro_version != $gtkmm_config_micro_version))
798 printf("\n*** 'gtkmm-config --version' returned %d.%d.%d, but GTK-- (%d.%d.%d)\n",
799 $gtkmm_config_major_version, $gtkmm_config_minor_version, $gtkmm_config_micro_version,
800 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
801 printf ("*** was found! If gtkmm-config was correct, then it is best\n");
802 printf ("*** to remove the old version of GTK--. You may also be able to fix the error\n");
803 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
804 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
805 printf("*** required on your system.\n");
806 printf("*** If gtkmm-config was wrong, set the environment variable GTKMM_CONFIG\n");
807 printf("*** to point to the correct copy of gtkmm-config, and remove the file config.cache\n");
808 printf("*** before re-running configure\n");
810 /* GTK-- does not have the GTKMM_*_VERSION constants */
812 else if ((gtkmm_major_version != GTKMM_MAJOR_VERSION) ||
813 (gtkmm_minor_version != GTKMM_MINOR_VERSION) ||
814 (gtkmm_micro_version != GTKMM_MICRO_VERSION))
816 printf("*** GTK-- header files (version %d.%d.%d) do not match\n",
817 GTKMM_MAJOR_VERSION, GTKMM_MINOR_VERSION, GTKMM_MICRO_VERSION);
818 printf("*** library (version %d.%d.%d)\n",
819 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
824 if ((gtkmm_major_version > major) ||
825 ((gtkmm_major_version == major) && (gtkmm_minor_version > minor)) ||
826 ((gtkmm_major_version == major) && (gtkmm_minor_version == minor) && (gtkmm_micro_version >= micro)))
832 printf("\n*** An old version of GTK-- (%d.%d.%d) was found.\n",
833 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
834 printf("*** You need a version of GTK-- newer than %d.%d.%d. The latest version of\n",
835 major, minor, micro);
836 printf("*** GTK-- is always available from ftp://ftp.gtk.org.\n");
838 printf("*** If you have already installed a sufficiently new version, this error\n");
839 printf("*** probably means that the wrong copy of the gtkmm-config shell script is\n");
840 printf("*** being found. The easiest way to fix this is to remove the old version\n");
841 printf("*** of GTK--, but you can also set the GTKMM_CONFIG environment to point to the\n");
842 printf("*** correct copy of gtkmm-config. (In this case, you will have to\n");
843 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
844 printf("*** so that the correct libraries are found at run-time))\n");
849 ],, no_gtkmm=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
850 CXXFLAGS="$ac_save_CXXFLAGS"
854 if test "x$no_gtkmm" = x ; then
856 ifelse([$2], , :, [$2])
859 if test "$GTKMM_CONFIG" = "no" ; then
860 echo "*** The gtkmm-config script installed by GTK-- could not be found"
861 echo "*** If GTK-- was installed in PREFIX, make sure PREFIX/bin is in"
862 echo "*** your path, or set the GTK_CONFIG environment variable to the"
863 echo "*** full path to gtk-config."
864 echo "*** The gtkmm-config script was not available in GTK-- versions"
865 echo "*** prior to 0.9.12. Perhaps you need to update your installed"
866 echo "*** version to 0.9.12 or newer"
868 if test -f conf.gtkmmtest ; then
871 echo "*** Could not run GTK-- test program, checking why..."
872 CXXFLAGS="$CFLAGS $GTKMM_CXXFLAGS"
873 LIBS="$LIBS $GTK___LIBS"
877 ], [ return ((gtkmm_major_version) || (gtkmm_minor_version) || (gtkmm_micro_version)); ],
878 [ echo "*** The test program compiled, but did not run. This usually means"
879 echo "*** that the run-time linker is not finding GTK-- or finding the wrong"
880 echo "*** version of GTK--. If it is not finding GTK--, you'll need to set your"
881 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
882 echo "*** to the installed location Also, make sure you have run ldconfig if that"
883 echo "*** is required on your system"
885 echo "*** If you have an old version installed, it is best to remove it, although"
886 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
887 [ echo "*** The test program failed to compile or link. See the file config.log for the"
888 echo "*** exact error that occured. This usually means GTK-- was incorrectly installed"
889 echo "*** or that you have moved GTK-- since it was installed. In the latter case, you"
890 echo "*** may want to edit the gtkmm-config script: $GTKMM_CONFIG" ])
891 CXXFLAGS="$ac_save_CXXFLAGS"
897 ifelse([$3], , :, [$3])
900 AC_SUBST(GTK___CFLAGS)
905 # Configure paths for GTK--DRAW
906 # Derek Quinn Wyatt 98-08-21 (adapted from Jan Nieuwenhuizen's code)
908 dnl AM_PATH_GTK__DRAW([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
909 dnl Test for GTK--DRAW, and define GTK___CFLAGS and GTK___LIBS
911 AC_DEFUN(AM_PATH_GTK__DRAW,
913 dnl Get the cflags and libraries from the gtk__-config script
915 AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
916 min_gtk___version=ifelse([$1], ,0.0.5,$1)
917 AC_MSG_CHECKING(for GTK--DRAW - version >= $min_gtk___version)
919 if test "$GTKMM_CONFIG" != "no" ; then
920 GTK___CFLAGS=`$GTKMM_CONFIG --cflags`
921 GTK___LIBS=`$GTKMM_CONFIG --libs`
922 GTK___DLIBS="$GTK___LIBS -lgtkmmdraw"
923 GTK___LIBS="$GTK___DLIBS"
924 ac_save_CFLAGS="$CFLAGS"
926 ac_save_CXXFLAGS="$CXXFLAGS"
927 CFLAGS="$CFLAGS $GTK___CFLAGS"
928 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
929 LIBS="$LIBS $GTK___LIBS"
931 dnl Now check if the installed GTK__ is sufficiently new. (Also sanity
932 dnl checks the results of gtk__-config to some extent
944 ],, no_gtk__=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
945 CFLAGS="$ac_save_CFLAGS"
946 CXXFLAGS="$ac_save_CXXFLAGS"
951 if test "x$no_gtk__" = x ; then
953 ifelse([$2], , :, [$2])
958 ifelse([$3], , :, [$3])
960 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
962 AC_SUBST(GTK___CFLAGS)