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 CFLAGS="$CFLAGS $OPTIMIZE"
83 CPPFLAGS=${CPPFLAGS:-""}
93 AC_DEFUN(AC_STEPMAKE_CXX, [
97 AC_CHECK_HEADER(FlexLexer.h, true,
98 AC_STEPMAKE_WARN(can"\'"t find flex header. Please install Flex headers correctly))
100 CPPFLAGS="$CPPFLAGS $DEFINES"
101 CXXFLAGS="$CXXFLAGS $OPTIMIZE"
110 AC_DEFUN(AC_STEPMAKE_CXXTEMPLATE, [
111 AC_CACHE_CHECK([whether explicit instantiation is needed],
112 lily_cv_need_explicit_instantiation,
114 template <class T> struct foo { static int baz; };
115 template <class T> int foo<T>::baz = 1;
116 ], [ return foo<int>::baz; ],
117 lily_cv_need_explicit_instantiation=no,
118 lily_cv_need_explicit_instantiation=yes))
119 if test x"$lily_cv_need_explicit_instantiation"x = x"yes"x; then
120 AC_DEFINE(NEED_EXPLICIT_INSTANTIATION)
124 AC_DEFUN(AC_STEPMAKE_DATADIR, [
125 if test "$datadir" = "\${prefix}/share"; then
126 datadir='${prefix}/share/'$package
128 DIR_DATADIR=${datadir}
130 if test "$prefix" = "NONE"; then
131 presome=${ac_default_prefix}
133 DIR_DATADIR=`echo ${DIR_DATADIR} | sed "s!\\\${prefix}!$presome!"`
135 AC_SUBST(DIR_DATADIR)
136 AC_DEFINE_UNQUOTED(DIR_DATADIR, "${DIR_DATADIR}")
139 AC_DEFUN(AC_STEPMAKE_END, [
140 AC_OUTPUT($CONFIGFILE.make:config.make.in)
143 cp make/toplevel.make.in ./GNUmakefile
144 chmod 444 GNUmakefile
147 AC_DEFUN(AC_STEPMAKE_GXX, [
149 # urg, egcs: how to check for egcs >= 1.1?
150 changequote(<<, >>)dnl
151 if $CXX --version | grep '2\.8' > /dev/null ||
152 $CXX --version | grep 'egcs' > /dev/null
157 AC_STEPMAKE_WARN(can\'t find g++ 2.8 or egcs 1.1)
161 AC_DEFUN(AC_STEPMAKE_GUILE, [
162 # on some systems, -lguile succeeds for guile-1.3
163 # others need readline, dl (or even more)
164 # urg, must check for different functions in libguile
165 # to force new check iso reading from cache
167 # gh_scm2doubles,gh_doubles2scm are new in 1.3
168 AC_CHECK_LIB(guile, gh_scm2doubles, \
169 LIBS="-lguile $LIBS"; AC_DEFINE(HAVE_LIBGUILE), \
170 AC_CHECK_LIB(readline, readline) \
171 AC_CHECK_LIB(dl, dlopen) \
172 AC_CHECK_LIB(socket, socket)\
173 AC_CHECK_LIB(termcap,tgetent)\
174 AC_CHECK_LIB(m, fabs)\
175 AC_CHECK_LIB(guile, gh_doubles2scm)\
177 if test "$ac_cv_lib_guile_gh_scm2doubles" != yes -a \
178 "$ac_cv_lib_guile_gh_doubles2scm" != yes ; then
179 AC_STEPMAKE_WARN(You should install guile 1.3 or newer)
183 AC_DEFUN(AC_STEPMAKE_INIT, [
186 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
187 if test x$MY_PATCH_LEVEL != x; then
188 FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
191 # urg: don't "fix" this: irix doesn't know about [:lower:] and [:upper:]
192 changequote(<<, >>)dnl
193 PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
194 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
197 # No versioning on directory names of sub-packages
199 stepmake=${datadir}/stepmake
201 if test "$prefix" = "NONE"; then
202 presome=${ac_default_prefix}
204 stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
206 if test "x$PACKAGE" = "xSTEPMAKE"; then
207 echo Stepmake package!
208 (cd stepmake; rm -f stepmake; ln -s ../stepmake .)
209 (cd stepmake; rm -f bin; ln -s ../bin .)
210 AC_CONFIG_AUX_DIR(bin)
213 echo Package: $PACKAGE
214 # Check for installed stepmake
215 if test -d $stepmake; then
216 echo Using installed stepmake: $stepmake
218 stepmake='$(depth)'/stepmake
219 echo Using local stepmake: $datadir/stepmake not found
222 $HOME/usr/local/share/stepmake/bin\
223 $HOME/usr/local/lib/stepmake/bin\
224 $HOME/usr/share/stepmake/bin\
225 $HOME/usr/lib/stepmake/bin\
226 /usr/local/share/stepmake/bin\
227 /usr/local/lib/stepmake/bin\
228 /usr/share/stepmake/bin\
229 /usr/lib/stepmake/bin\
237 AC_SUBST(PACKAGE_NAME)
238 AC_DEFINE_UNQUOTED(PACKAGE, "${PACKAGE_NAME}")
239 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, "${FULL_VERSION}")
241 package_depth=`dirname $cache_file`
242 AC_SUBST(package_depth)
244 AUTOGENERATE="This file was automatically generated by configure"
245 AC_SUBST(AUTOGENERATE)
246 absolute_builddir="`pwd`"
247 AC_SUBST(absolute_builddir)
249 STATE_VECTOR=`ls make/STATE-VECTOR 2>/dev/null`
250 if test "x$STATE_VECTOR" != "x"; then
251 STATE_VECTOR="\$(depth)/$STATE_VECTOR"
253 AC_SUBST(STATE_VECTOR)
256 AC_ARG_ENABLE(config,
257 [ enable-config=FILE put configure settings in config-FILE.make],
258 [CONFIGSUFFIX=$enableval])
260 if test "$CONFIGSUFFIX" != "" ; then
261 CONFIGFILE=config-$CONFIGSUFFIX
265 AC_SUBST(CONFIGSUFFIX)
268 AC_CHECK_PROGS(MAKE, make, error)
269 AC_CHECK_PROGS(FIND, find, error)
272 dnl system supplied INSTALL is unsafe; use our own install.
274 dnl if test "$INSTALL" = "bin/install-sh"; then
275 dnl export INSTALL="\$\(depth\)/bin/install-sh"
278 AC_CHECK_PROGS(TAR, tar, error)
279 AC_CHECK_PROGS(BASH, bash, /bin/sh)
281 AC_PATH_PROG(PYTHON, ${PYTHON:-python}, -echo no python)
285 AC_CHECK_SEARCH_RESULT($MAKE, GNU make, You should install GNU make)
286 if test $MAKE != "error" ; then
287 $MAKE -v| grep GNU > /dev/null
290 AC_STEPMAKE_WARN(Please install *GNU* make)
294 AC_CHECK_SEARCH_RESULT($PYTHON, python, You should install Python)
296 if test "x$OSTYPE" = "xcygwin32" || test "x$OSTYPE" = "xWindows_NT"; then
297 LN=cp # hard link does not work under cygnus-nt
298 LN_S=cp # symbolic link does not work for native nt
305 # cygwin fixes all these things.
306 # it seems these were used because of dos-style TEXINPUTS and
307 # MFINPUTS needed for miktex.
308 # but this breaks parsing of all other cygwin/unix style paths.
310 # if your (mik)tex breaks, make a:
311 # /usr/local/bin/tex:
313 # TEXINPUTS=`cygpath -pw $TEXINPUTS` /texmf/miktex/bin/tex $*
319 # MFINPUTS=`cygpath -pw $MFINPUTS` /texmf/miktex/bin/mf $*
321 # this way, you may have buildscripts/out/lilypond-profile
322 # 'automatically' sourced from /usr/etc/profile.d/ too.
326 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
333 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-sh -c"
340 AC_DEFINE_UNQUOTED(DIRSEP, '${DIRSEP}')
341 AC_DEFINE_UNQUOTED(PATHSEP, '${PATHSEP}')
349 AC_DEFUN(AC_STEPMAKE_LEXYACC, [
350 # ugh, automake: we want (and check for) bison
352 # ugh, automake: we want (and check for) flex
354 # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
358 ac_cv_prog_lex_root=lex.yy
360 AC_CHECK_PROGS(BISON, bison, error)
361 AC_CHECK_PROGS(FLEX, flex, error)
362 AC_CHECK_SEARCH_RESULT($BISON, bison, Please install Bison, 1.25 or newer)
363 AC_CHECK_SEARCH_RESULT($FLEX, flex, Please install Flex, 2.5 or newer)
365 if test $BISON != "error"; then
366 bison_version=`$BISON --version| sed 's/^.*version 1.//g' `
367 if test $bison_version -lt 25; then
368 AC_STEPMAKE_WARN(Your bison is a bit old (1.$bison_version). You might have to install 1.25)
376 AC_DEFUN(AC_STEPMAKE_LIB, [
377 AC_CHECK_PROGS(AR, ar, error)
384 AC_DEFUN(AC_STEPMAKE_LIBTOOL, [
386 # **Never** try to set library version numbers so that they correspond
387 # to the release number of your package. This is an abuse that only
388 # fosters misunderstanding of the purpose of library versions.
390 REVISION=$PATCH_LEVEL
391 # CURRENT=$MINOR_VERSION
392 CURRENT=`expr $MINOR_VERSION + 1`
393 # AGE=$(expr $MAJOR_VERSION + 1)
400 AC_DEFUN(AC_STEPMAKE_LOCALE, [
405 AC_ARG_WITH(localedir,
406 [ with-localedir=LOCALE use LOCALE as locale dir. Default: PREFIX/share/locale ],
407 localedir=$with_localedir,
408 localedir='${prefix}/share/locale')
411 [ with-lang=LANG use LANG as language to emit messages],
415 AC_MSG_CHECKING(language)
417 En* | en* | Am* | am* | US* | us*)
419 NL | nl | Du* | du* | Ned* | ned*)
428 if test "$lang" = "unknown" ; then
429 AC_STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS)
434 AC_DEFUN(AC_STEPMAKE_GETTEXT, [
435 DIR_LOCALEDIR=${localedir}
437 if test "$prefix" = "NONE"; then
438 presome=${ac_default_prefix}
440 DIR_LOCALEDIR=`echo ${DIR_LOCALEDIR} | sed "s!\\\${prefix}!$presome!"`
442 AC_SUBST(DIR_LOCALEDIR)
443 AC_DEFINE_UNQUOTED(DIR_LOCALEDIR, "${DIR_LOCALEDIR}")
445 AC_CHECK_LIB(intl, gettext)
446 AC_CHECK_FUNCS(gettext)
449 AC_DEFUN(AC_STEPMAKE_MAN, [
450 AC_CHECK_PROGS(TROFF, troff, -echo no troff)
453 AC_DEFUN(AC_STEPMAKE_MSGFMT, [
454 # AC_CHECK_PROGS(MSGFMT, msgfmt, -echo no msgfmt)
455 AC_CHECK_PROGS(MSGFMT, msgfmt, \$(SHELL) \$(step-bindir)/fake-msgfmt.sh )
456 AC_MSG_CHECKING(whether msgfmt accepts -o)
457 msgfmt_output="`msgfmt -o bla 2>&1 | grep usage`"
458 if test "$msgfmt_output" = ""; then
462 MSGFMT="\$(SHELL) \$(step-bindir)/fake-msgfmt.sh"
464 AC_STEPMAKE_WARN(please install msgfmt from GNU gettext)
466 if test ! -n "$MSGFMT"; then
467 AC_STEPMAKE_WARN(please install msgfmt from GNU gettext)
471 AC_DEFUN(AC_STEPMAKE_TEXMF_DIRS, [
472 AC_ARG_ENABLE(tex-prefix,
473 [ enable-tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)],
474 [TEXPREFIX=$enableval],
477 AC_ARG_ENABLE(tex-dir,
478 [ enable-tex-dir=DIR set the directory to put $PACKAGE_NAME TeX files in. ],
482 AC_ARG_ENABLE(mf-dir,
483 [ enable-mf-dir=DIR set the directory to put $PACKAGE_NAME MetaFont files in. ],
487 if test "x$TEXPREFIX" = xauto ; then
488 AC_TEX_PREFIX(TEXPREFIX)
490 find_texprefix=$TEXPREFIX
493 if test "x$MFDIR" = xauto; then
497 if test "x$TEXDIR" = xauto ; then
498 AC_TEX_SUBDIR(TEXDIR)
505 AC_DEFUN(AC_STEPMAKE_TEXMF, [
506 # urg, never know what names these teTeX guys will think up
507 AC_CHECK_PROGS(METAFONT, mf, no)
508 if test "x$METAFONT" = "xno"; then
509 AC_CHECK_PROGS(MFONT, mfont, -echo no mf or mfont)
513 AC_CHECK_PROGS(METAPOST, mp, no)
514 if test "x$METAPOST" = "xno"; then
515 AC_CHECK_PROGS(MPOST, mpost, -echo no mp or mpost)
523 AC_DEFUN(AC_STEPMAKE_WARN, [
528 AC_DEFUN(AC_STEPMAKE_YODL, [
529 if test "x$YODL" = "x"; then
530 AC_CHECK_PROGS(STRIPROFF, striproff, -echo no striproff)
531 AC_CHECK_PROGS(YODL, yodl, -echo no yodl)
532 AC_CHECK_PROGS(YODL2HTML, yodl2html, -echo no yodl)
533 AC_CHECK_PROGS(YODL2LATEX, yodl2latex, )
534 AC_CHECK_PROGS(YODL2MAN, yodl2man, -echo no yodl)
535 AC_CHECK_PROGS(YODL2MSLESS, yodl2msless, -echo no yodl)
536 AC_CHECK_PROGS(YODL2TEXINFO, yodl2texinfo, -echo no yodl)
537 AC_CHECK_PROGS(YODL2TXT, yodl2txt, -echo no yodl)
538 YODL2LESS_DIR='$(bindir)/'
544 AC_SUBST(YODL2LESS_DIR)
546 AC_SUBST(YODL2MSLESS)
547 AC_SUBST(YODL2TEXINFO)
549 export STRIPROFF YODL YODL2HTML YODL2LATEX YODL2MAN YODL2MSLESS YODL2TEXINFO YODL2TXT
551 if test "x$YODL" = "-echo no yodl"; then
552 AC_STEPMAKE_WARN(Did not find YODL (Yodl is Yet Oneother Document Language, see http://www.cs.uu.nl/~hanwen/yodl))
556 dnl should cache result.
557 dnl should look in $prefix first.
558 dnl should probably assume TDS
560 AC_DEFUN(AC_TEX_PREFIX, [
563 AC_MSG_CHECKING(TeX/MF root dir directory)
565 find_root_prefix="$prefix"
568 test "x$find_root_prefix" = xNONE && find_root_prefix="$ac_default_prefix"
570 for postfix in "/lib/tex/" "/lib/texmf" "/lib" "/tex" "/texmf"; do
571 find_texprefix="$find_root_prefix$postfix"
572 if test -d $find_texprefix; then
573 find_texpostfix=$postfix
578 if test "x$find_texpostfix" = x; then
579 find_texpostfix='/lib/texmf/tex'
580 AC_STEPMAKE_WARN(Cannot determine the TeX-directory. Please use --enable-tex-prefix)
583 find_texprefix="$find_root_prefix/$find_texpostfix"
585 # only assign if variablename not empty
586 if test x != "x[$]$1"; then
587 $1='${prefix}'/"$find_texpostfix"
589 AC_MSG_RESULT($find_texprefix)
594 # find a directory inside a prefix,
595 # $1 the prefix (expanded version)
596 # $2 variable to assign
597 # $3 the directory name
599 AC_DEFUN(AC_FIND_DIR_IN_PREFIX, [
601 AC_MSG_CHECKING($4 directory)
603 $FIND ./ -type d -a -name $3 -print |sort|head -1|sed 's#^\./##')`
606 if test "x$find_dirdir" = x; then
608 AC_STEPMAKE_WARN(Cannot determine $4 subdirectory. Please set from command-line)
612 AC_MSG_RESULT($1/$find_dirdir)
615 # ugh. this is hopeless
616 AC_DEFUN(AC_KPSE_TEX_DIR, [
617 kpse_paths=`(kpsepath -n latex tex; kpsepath -n tex tex) | sed 's/:/ /g' | tr ' ' '\012' |sort | uniq -d`
618 kpse_syspaths=`echo $kpse_paths | grep '!'| sed 's/!//g'`
620 if test -w "$kpse_syspaths";
622 dir=`echo $kpse_syspaths | head -1`
624 dir=`echo $kpse_paths | grep -v '!'| head -1`
626 if test "$prefix" = "NONE"; then
627 local_prefix=$ac_default_prefix
628 local_prefix_quote='${prefix}'
632 local_prefix_quote=$prefix
634 echo $local_prefix_quote = $local_prefix
636 echo $dir | sed 's!'$local_prefix'!\$local_prefix_quote!g'
639 AC_DEFUN(AC_TEX_SUBDIR, [
640 dnl AC_REQUIRE([AC_TEX_PREFIX])
641 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, tex,TeX input)
645 AC_DEFUN(AC_MF_SUBDIR, [
646 dnl AC_REQUIRE([AC_TEX_PREFIX])
647 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, source, MF input)
651 AC_DEFUN(AC_CHECK_SEARCH_RESULT, [
652 result="`echo \"$1\" | grep echo`"
653 if test "x$1" = "xerror" -o "x$result" != "x"; then
654 AC_STEPMAKE_WARN(can\'t find $2. $3)
659 # Configure paths for GTK+
660 # Owen Taylor 97-11-3
662 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
663 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
665 AC_DEFUN(AM_PATH_GTK,
667 dnl Get the cflags and libraries from the gtk-config script
669 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
670 min_gtk_version=ifelse([$1], ,1.1.1,$1)
671 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
673 if test "$GTK_CONFIG" != "no" ; then
674 GTK_CFLAGS=`$GTK_CONFIG --cflags`
675 GTK_LIBS=`$GTK_CONFIG --libs`
676 ac_save_CFLAGS="$CFLAGS"
678 ac_save_CXXFLAGS="$CXXFLAGS"
679 CFLAGS="$CFLAGS $GTK_CFLAGS"
680 CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
681 LIBS="$LIBS $GTK_LIBS"
683 dnl Now check if the installed GTK is sufficiently new. (Also sanity
684 dnl checks the results of gtk-config to some extent
693 int major, minor, micro;
695 if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) {
696 printf("%s, bad version string\n", "$min_gtk_version");
700 return !((gtk_major_version > major) ||
701 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
702 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)));
704 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
705 CFLAGS="$ac_save_CFLAGS"
706 CXXFLAGS="$ac_save_CXXFLAGS"
711 if test "x$no_gtk" = x ; then
713 ifelse([$2], , :, [$2])
718 ifelse([$3], , :, [$3])
720 CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
727 # Configure paths for GTK--
728 # Erik Andersen 30 May 1998
729 # Modified by Tero Pulkkinen (added the compiler checks... I hope they work..)
731 dnl Test for GTK__, and define GTK___CFLAGS and GTK___LIBS
732 dnl to be used as follows:
733 dnl AM_PATH_GTKMM([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
736 dnl Get the cflags and libraries from the gtkmm-config script
738 AC_ARG_WITH(gtkmm-prefix,[ --with-gtkmm-prefix=PREFIX
739 Prefix where GTK-- is installed (optional)],
740 gtkmm_config_prefix="$withval", gtkmm_config_prefix="")
741 AC_ARG_WITH(gtkmm-exec-prefix,[ --with-gtkmm-exec-prefix=PREFIX
742 Exec prefix where GTK-- is installed (optional)],
743 gtkmm_config_exec_prefix="$withval", gtkmm_config_exec_prefix="")
744 AC_ARG_ENABLE(gtkmmtest, [ --disable-gtkmmtest Do not try to compile and run a test GTK-- program],
745 , enable_gtkmmtest=yes)
747 if test x$gtkmm_config_exec_prefix != x ; then
748 gtkmm_config_args="$gtkmm_config_args --exec-prefix=$gtkmm_config_exec_prefix"
749 if test x${GTKMM_CONFIG+set} != xset ; then
750 GTKMM_CONFIG=$gtkmm_config_exec_prefix/bin/gtkmm-config
753 if test x$gtkmm_config_prefix != x ; then
754 gtkmm_config_args="$gtkmm_config_args --prefix=$gtkmm_config_prefix"
755 if test x${GTKMM_CONFIG+set} != xset ; then
756 GTKMM_CONFIG=$gtkmm_config_prefix/bin/gtkmm-config
761 AC_DEFUN(AM_PATH_GTKMM,
765 dnl Check check if the installed GTK-- is sufficiently new.
767 AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
768 min_gtkmm_version=ifelse([$1], ,0.9.14,$1)
770 AC_MSG_CHECKING(for GTK-- - version >= $min_gtkmm_version)
772 if test "$GTKMM_CONFIG" = "no" ; then
778 GTK___CFLAGS=`$GTKMM_CONFIG $gtkmm_config_args --cflags`
779 GTK___LIBS=`$GTKMM_CONFIG $gtkmm_config_args --libs`
780 gtkmm_config_major_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
781 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
782 gtkmm_config_minor_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
783 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
784 gtkmm_config_micro_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
785 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
786 if test "x$enable_gtkmmtest" = "xyes" ; then
787 ac_save_CXXFLAGS="$CXXFLAGS"
789 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
790 LIBS="$LIBS $GTK___LIBS"
792 dnl Now check if the installed GTK-- is sufficiently new. (Also sanity
793 dnl checks the results of gtkmm-config to some extent
804 int major, minor, micro;
807 system ("touch conf.gtkmmtest");
809 /* HP/UX 0 (%@#!) writes to sscanf strings */
810 tmp_version = g_strdup("$min_gtkmm_version");
811 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
812 printf("%s, bad version string\n", "$min_gtkmm_version");
816 if ((gtkmm_major_version != $gtkmm_config_major_version) ||
817 (gtkmm_minor_version != $gtkmm_config_minor_version) ||
818 (gtkmm_micro_version != $gtkmm_config_micro_version))
820 printf("\n*** 'gtkmm-config --version' returned %d.%d.%d, but GTK-- (%d.%d.%d)\n",
821 $gtkmm_config_major_version, $gtkmm_config_minor_version, $gtkmm_config_micro_version,
822 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
823 printf ("*** was found! If gtkmm-config was correct, then it is best\n");
824 printf ("*** to remove the old version of GTK--. You may also be able to fix the error\n");
825 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
826 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
827 printf("*** required on your system.\n");
828 printf("*** If gtkmm-config was wrong, set the environment variable GTKMM_CONFIG\n");
829 printf("*** to point to the correct copy of gtkmm-config, and remove the file config.cache\n");
830 printf("*** before re-running configure\n");
832 /* GTK-- does not have the GTKMM_*_VERSION constants */
834 else if ((gtkmm_major_version != GTKMM_MAJOR_VERSION) ||
835 (gtkmm_minor_version != GTKMM_MINOR_VERSION) ||
836 (gtkmm_micro_version != GTKMM_MICRO_VERSION))
838 printf("*** GTK-- header files (version %d.%d.%d) do not match\n",
839 GTKMM_MAJOR_VERSION, GTKMM_MINOR_VERSION, GTKMM_MICRO_VERSION);
840 printf("*** library (version %d.%d.%d)\n",
841 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
846 if ((gtkmm_major_version > major) ||
847 ((gtkmm_major_version == major) && (gtkmm_minor_version > minor)) ||
848 ((gtkmm_major_version == major) && (gtkmm_minor_version == minor) && (gtkmm_micro_version >= micro)))
854 printf("\n*** An old version of GTK-- (%d.%d.%d) was found.\n",
855 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
856 printf("*** You need a version of GTK-- newer than %d.%d.%d. The latest version of\n",
857 major, minor, micro);
858 printf("*** GTK-- is always available from ftp://ftp.gtk.org.\n");
860 printf("*** If you have already installed a sufficiently new version, this error\n");
861 printf("*** probably means that the wrong copy of the gtkmm-config shell script is\n");
862 printf("*** being found. The easiest way to fix this is to remove the old version\n");
863 printf("*** of GTK--, but you can also set the GTKMM_CONFIG environment to point to the\n");
864 printf("*** correct copy of gtkmm-config. (In this case, you will have to\n");
865 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
866 printf("*** so that the correct libraries are found at run-time))\n");
871 ],, no_gtkmm=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
872 CXXFLAGS="$ac_save_CXXFLAGS"
876 if test "x$no_gtkmm" = x ; then
878 ifelse([$2], , :, [$2])
881 if test "$GTKMM_CONFIG" = "no" ; then
882 echo "*** The gtkmm-config script installed by GTK-- could not be found"
883 echo "*** If GTK-- was installed in PREFIX, make sure PREFIX/bin is in"
884 echo "*** your path, or set the GTK_CONFIG environment variable to the"
885 echo "*** full path to gtk-config."
886 echo "*** The gtkmm-config script was not available in GTK-- versions"
887 echo "*** prior to 0.9.12. Perhaps you need to update your installed"
888 echo "*** version to 0.9.12 or newer"
890 if test -f conf.gtkmmtest ; then
893 echo "*** Could not run GTK-- test program, checking why..."
894 CXXFLAGS="$CFLAGS $GTKMM_CXXFLAGS"
895 LIBS="$LIBS $GTK___LIBS"
899 ], [ return ((gtkmm_major_version) || (gtkmm_minor_version) || (gtkmm_micro_version)); ],
900 [ echo "*** The test program compiled, but did not run. This usually means"
901 echo "*** that the run-time linker is not finding GTK-- or finding the wrong"
902 echo "*** version of GTK--. If it is not finding GTK--, you'll need to set your"
903 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
904 echo "*** to the installed location Also, make sure you have run ldconfig if that"
905 echo "*** is required on your system"
907 echo "*** If you have an old version installed, it is best to remove it, although"
908 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
909 [ echo "*** The test program failed to compile or link. See the file config.log for the"
910 echo "*** exact error that occured. This usually means GTK-- was incorrectly installed"
911 echo "*** or that you have moved GTK-- since it was installed. In the latter case, you"
912 echo "*** may want to edit the gtkmm-config script: $GTKMM_CONFIG" ])
913 CXXFLAGS="$ac_save_CXXFLAGS"
919 ifelse([$3], , :, [$3])
922 AC_SUBST(GTK___CFLAGS)
927 # Configure paths for GTK--DRAW
928 # Derek Quinn Wyatt 98-08-21 (adapted from Jan Nieuwenhuizen's code)
930 dnl AM_PATH_GTK__DRAW([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
931 dnl Test for GTK--DRAW, and define GTK___CFLAGS and GTK___LIBS
933 AC_DEFUN(AM_PATH_GTK__DRAW,
935 dnl Get the cflags and libraries from the gtk__-config script
937 AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
938 min_gtk___version=ifelse([$1], ,0.0.5,$1)
939 AC_MSG_CHECKING(for GTK--DRAW - version >= $min_gtk___version)
941 if test "$GTKMM_CONFIG" != "no" ; then
942 GTK___CFLAGS=`$GTKMM_CONFIG --cflags`
943 GTK___LIBS=`$GTKMM_CONFIG --libs`
944 GTK___DLIBS="$GTK___LIBS -lgtkmmdraw"
945 GTK___LIBS="$GTK___DLIBS"
946 ac_save_CFLAGS="$CFLAGS"
948 ac_save_CXXFLAGS="$CXXFLAGS"
949 CFLAGS="$CFLAGS $GTK___CFLAGS"
950 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
951 LIBS="$LIBS $GTK___LIBS"
953 dnl Now check if the installed GTK__ is sufficiently new. (Also sanity
954 dnl checks the results of gtk__-config to some extent
966 ],, no_gtk__=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
967 CFLAGS="$ac_save_CFLAGS"
968 CXXFLAGS="$ac_save_CXXFLAGS"
973 if test "x$no_gtk__" = x ; then
975 ifelse([$2], , :, [$2])
980 ifelse([$3], , :, [$3])
982 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
984 AC_SUBST(GTK___CFLAGS)