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 # urg, must check for different functions in libguile
160 # to force new check iso reading from cache
161 AC_CHECK_LIB(guile, scm_shell, \
162 LIBS="-lguile $LIBS" AC_DEFINE(HAVE_LIBGUILE), \
163 AC_CHECK_LIB(readline, readline) \
164 AC_CHECK_LIB(dl, dlopen) \
165 AC_CHECK_LIB(socket, socket)\
166 AC_CHECK_LIB(termcap,tgetent)\
167 AC_CHECK_LIB(m, fabs)\
168 AC_CHECK_LIB(guile, scm_boot_guile)\
172 AC_DEFUN(AC_STEPMAKE_INIT, [
175 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
176 if test x$MY_PATCH_LEVEL != x; then
177 FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
180 # urg: don't "fix" this: irix doesn't know about [:lower:] and [:upper:]
181 changequote(<<, >>)dnl
182 PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
183 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
186 # No versioning on directory names of sub-packages
188 stepmake=${datadir}/stepmake
190 if test "$prefix" = "NONE"; then
191 presome=${ac_default_prefix}
193 stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
195 if test "x$PACKAGE" = "xSTEPMAKE"; then
196 echo Stepmake package!
197 (cd stepmake; rm -f stepmake; ln -s ../stepmake .)
198 (cd stepmake; rm -f bin; ln -s ../bin .)
199 AC_CONFIG_AUX_DIR(bin)
202 echo Package: $PACKAGE
203 # Check for installed stepmake
204 if test -d $stepmake; then
205 echo Using installed stepmake: $stepmake
207 stepmake='$(depth)'/stepmake
208 echo Using local stepmake: $datadir/stepmake not found
211 $HOME/usr/local/share/stepmake/bin\
212 $HOME/usr/local/lib/stepmake/bin\
213 $HOME/usr/share/stepmake/bin\
214 $HOME/usr/lib/stepmake/bin\
215 /usr/local/share/stepmake/bin\
216 /usr/local/lib/stepmake/bin\
217 /usr/share/stepmake/bin\
218 /usr/lib/stepmake/bin\
226 AC_SUBST(PACKAGE_NAME)
227 AC_DEFINE_UNQUOTED(PACKAGE, "${PACKAGE_NAME}")
228 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, "${FULL_VERSION}")
230 package_depth=`dirname $cache_file`
231 AC_SUBST(package_depth)
233 AUTOGENERATE="This file was automatically generated by configure"
234 AC_SUBST(AUTOGENERATE)
235 absolute_builddir="`pwd`"
236 AC_SUBST(absolute_builddir)
238 STATE_VECTOR=`ls make/STATE-VECTOR 2>/dev/null`
239 if test "x$STATE_VECTOR" != "x"; then
240 STATE_VECTOR="\$(depth)/$STATE_VECTOR"
242 AC_SUBST(STATE_VECTOR)
245 AC_ARG_ENABLE(config,
246 [ enable-config=FILE put configure settings in config-FILE.make],
247 [CONFIGSUFFIX=$enableval])
249 if test "$CONFIGSUFFIX" != "" ; then
250 CONFIGFILE=config-$CONFIGSUFFIX
254 AC_SUBST(CONFIGSUFFIX)
257 AC_CHECK_PROGS(MAKE, make, error)
258 AC_CHECK_PROGS(FIND, find, error)
261 dnl system supplied INSTALL is unsafe; use our own install.
263 dnl if test "$INSTALL" = "bin/install-sh"; then
264 dnl export INSTALL="\$\(depth\)/bin/install-sh"
267 AC_CHECK_PROGS(TAR, tar, error)
268 AC_CHECK_PROGS(BASH, bash, /bin/sh)
270 AC_PATH_PROG(PYTHON, ${PYTHON:-python}, -echo no python)
274 AC_CHECK_SEARCH_RESULT($MAKE, GNU make, You should install GNU make)
275 if test $MAKE != "error" ; then
276 $MAKE -v| grep GNU > /dev/null
279 AC_STEPMAKE_WARN(Please install *GNU* make)
283 AC_CHECK_SEARCH_RESULT($PYTHON, python, You should install Python)
285 if test "x$OSTYPE" = "xcygwin32" || test "x$OSTYPE" = "xWindows_NT"; then
286 LN=cp # hard link does not work under cygnus-nt
287 LN_S=cp # symbolic link does not work for native nt
292 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
299 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-sh -c"
306 AC_DEFINE_UNQUOTED(DIRSEP, '${DIRSEP}')
307 AC_DEFINE_UNQUOTED(PATHSEP, '${PATHSEP}')
315 AC_DEFUN(AC_STEPMAKE_LEXYACC, [
316 # ugh, automake: we want (and check for) bison
318 # ugh, automake: we want (and check for) flex
320 # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
324 ac_cv_prog_lex_root=lex.yy
326 AC_CHECK_PROGS(BISON, bison, error)
327 AC_CHECK_PROGS(FLEX, flex, error)
328 AC_CHECK_SEARCH_RESULT($BISON, bison, Please install Bison, 1.25 or better)
329 AC_CHECK_SEARCH_RESULT($FLEX, flex, Please install Flex, 2.5 or better)
331 if test $BISON != "error"; then
332 bison_version=`$BISON --version| sed 's/^.*version 1.//g' `
333 if test $bison_version -lt 25; then
334 AC_STEPMAKE_WARN(Your bison is a bit old (1.$bison_version). You might have to install 1.25)
342 AC_DEFUN(AC_STEPMAKE_LIB, [
343 AC_CHECK_PROGS(AR, ar, error)
350 AC_DEFUN(AC_STEPMAKE_LIBTOOL, [
352 # **Never** try to set library version numbers so that they correspond
353 # to the release number of your package. This is an abuse that only
354 # fosters misunderstanding of the purpose of library versions.
356 REVISION=$PATCH_LEVEL
357 # CURRENT=$MINOR_VERSION
358 CURRENT=`expr $MINOR_VERSION + 1`
359 # AGE=$(expr $MAJOR_VERSION + 1)
366 AC_DEFUN(AC_STEPMAKE_LOCALE, [
371 AC_ARG_WITH(localedir,
372 [ with-localedir=LOCALE use LOCALE as locale dir. Default: PREFIX/share/locale ],
373 localedir=$with_localedir,
374 localedir='${prefix}/share/locale')
377 [ with-lang=LANG use LANG as language to emit messages],
381 AC_MSG_CHECKING(language)
383 En* | en* | Am* | am* | US* | us*)
385 NL | nl | Du* | du* | Ned* | ned*)
394 if test "$lang" = "unknown" ; then
395 AC_STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS)
400 AC_DEFUN(AC_STEPMAKE_GETTEXT, [
401 DIR_LOCALEDIR=${localedir}
403 if test "$prefix" = "NONE"; then
404 presome=${ac_default_prefix}
406 DIR_LOCALEDIR=`echo ${DIR_LOCALEDIR} | sed "s!\\\${prefix}!$presome!"`
408 AC_SUBST(DIR_LOCALEDIR)
409 AC_DEFINE_UNQUOTED(DIR_LOCALEDIR, "${DIR_LOCALEDIR}")
411 AC_CHECK_LIB(intl, gettext)
412 AC_CHECK_FUNCS(gettext)
415 AC_DEFUN(AC_STEPMAKE_MAN, [
416 AC_CHECK_PROGS(TROFF, troff, -echo no troff)
419 AC_DEFUN(AC_STEPMAKE_MSGFMT, [
420 # AC_CHECK_PROGS(MSGFMT, msgfmt, -echo no msgfmt)
421 AC_CHECK_PROGS(MSGFMT, msgfmt, \$(SHELL) \$(step-bindir)/fake-msgfmt.sh )
422 AC_MSG_CHECKING(whether msgfmt accepts -o)
423 msgfmt_output="`msgfmt -o bla 2>&1 | grep usage`"
424 if test "$msgfmt_output" = ""; then
428 MSGFMT="\$(SHELL) \$(step-bindir)/fake-msgfmt.sh"
430 AC_STEPMAKE_WARN(please install msgfmt from GNU gettext)
432 if test ! -n "$MSGFMT"; then
433 AC_STEPMAKE_WARN(please install msgfmt from GNU gettext)
437 AC_DEFUN(AC_STEPMAKE_TEXMF_DIRS, [
438 AC_ARG_ENABLE(tex-prefix,
439 [ enable-tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)],
440 [TEXPREFIX=$enableval],
443 AC_ARG_ENABLE(tex-dir,
444 [ enable-tex-dir=DIR set the directory to put $PACKAGE_NAME TeX files in. ],
448 AC_ARG_ENABLE(mf-dir,
449 [ enable-mf-dir=DIR set the directory to put $PACKAGE_NAME MetaFont files in. ],
453 if test "x$TEXPREFIX" = xauto ; then
454 AC_TEX_PREFIX(TEXPREFIX)
456 find_texprefix=$TEXPREFIX
459 if test "x$MFDIR" = xauto; then
463 if test "x$TEXDIR" = xauto ; then
464 AC_TEX_SUBDIR(TEXDIR)
471 AC_DEFUN(AC_STEPMAKE_TEXMF, [
472 # urg, never know what names these teTeX guys will think up
473 AC_CHECK_PROGS(METAFONT, mf, no)
474 if test "x$METAFONT" = "xno"; then
475 AC_CHECK_PROGS(MFONT, mfont, -echo no mf or mfont)
479 AC_CHECK_PROGS(METAPOST, mp, no)
480 if test "x$METAPOST" = "xno"; then
481 AC_CHECK_PROGS(MPOST, mpost, -echo no mp or mpost)
489 AC_DEFUN(AC_STEPMAKE_WARN, [
494 AC_DEFUN(AC_STEPMAKE_YODL, [
495 if test "x$YODL" = "x"; then
496 AC_CHECK_PROGS(STRIPROFF, striproff, -echo no striproff)
497 AC_CHECK_PROGS(YODL, yodl, -echo no yodl)
498 AC_CHECK_PROGS(YODL2HTML, yodl2html, -echo no yodl)
499 AC_CHECK_PROGS(YODL2LATEX, yodl2latex, )
500 AC_CHECK_PROGS(YODL2MAN, yodl2man, -echo no yodl)
501 AC_CHECK_PROGS(YODL2MSLESS, yodl2msless, -echo no yodl)
502 AC_CHECK_PROGS(YODL2TEXINFO, yodl2texinfo, -echo no yodl)
503 AC_CHECK_PROGS(YODL2TXT, yodl2txt, -echo no yodl)
504 YODL2LESS_DIR='$(bindir)/'
510 AC_SUBST(YODL2LESS_DIR)
512 AC_SUBST(YODL2MSLESS)
513 AC_SUBST(YODL2TEXINFO)
515 export STRIPROFF YODL YODL2HTML YODL2LATEX YODL2MAN YODL2MSLESS YODL2TEXINFO YODL2TXT
517 if test "x$YODL" = "-echo no yodl"; then
518 AC_STEPMAKE_WARN(Did not find YODL (Yodl is Yet Oneother Document Language, see http://www.cs.uu.nl/~hanwen/yodl))
522 dnl should cache result.
523 dnl should look in $prefix first.
524 dnl should probably assume TDS
526 AC_DEFUN(AC_TEX_PREFIX, [
529 AC_MSG_CHECKING(TeX/MF root dir directory)
531 find_root_prefix="$prefix"
534 test "x$find_root_prefix" = xNONE && find_root_prefix="$ac_default_prefix"
536 for postfix in "/lib/tex/" "/lib/texmf" "/lib" "/tex" "/texmf"; do
537 find_texprefix="$find_root_prefix$postfix"
538 if test -d $find_texprefix; then
539 find_texpostfix=$postfix
544 if test "x$find_texpostfix" = x; then
545 find_texpostfix='/lib/texmf/tex'
546 AC_STEPMAKE_WARN(Cannot determine the TeX-directory. Please use --enable-tex-prefix)
549 find_texprefix="$find_root_prefix/$find_texpostfix"
551 # only assign if variablename not empty
552 if test x != "x[$]$1"; then
553 $1='${prefix}'/"$find_texpostfix"
555 AC_MSG_RESULT($find_texprefix)
560 # find a directory inside a prefix,
561 # $1 the prefix (expanded version)
562 # $2 variable to assign
563 # $3 the directory name
565 AC_DEFUN(AC_FIND_DIR_IN_PREFIX, [
567 AC_MSG_CHECKING($4 directory)
569 $FIND ./ -type d -a -name $3 -print |sort|head -1|sed 's#^\./##')`
572 if test "x$find_dirdir" = x; then
574 AC_STEPMAKE_WARN(Cannot determine $4 subdirectory. Please set from command-line)
578 AC_MSG_RESULT($1/$find_dirdir)
581 # ugh. this is hopeless
582 AC_DEFUN(AC_KPSE_TEX_DIR, [
583 kpse_paths=`(kpsepath -n latex tex; kpsepath -n tex tex) | sed 's/:/ /g' | tr ' ' '\012' |sort | uniq -d`
584 kpse_syspaths=`echo $kpse_paths | grep '!'| sed 's/!//g'`
586 if test -w "$kpse_syspaths";
588 dir=`echo $kpse_syspaths | head -1`
590 dir=`echo $kpse_paths | grep -v '!'| head -1`
592 if test "$prefix" = "NONE"; then
593 local_prefix=$ac_default_prefix
594 local_prefix_quote='${prefix}'
598 local_prefix_quote=$prefix
600 echo $local_prefix_quote = $local_prefix
602 echo $dir | sed 's!'$local_prefix'!\$local_prefix_quote!g'
605 AC_DEFUN(AC_TEX_SUBDIR, [
606 dnl AC_REQUIRE([AC_TEX_PREFIX])
607 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, tex,TeX input)
611 AC_DEFUN(AC_MF_SUBDIR, [
612 dnl AC_REQUIRE([AC_TEX_PREFIX])
613 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, source, MF input)
617 AC_DEFUN(AC_CHECK_SEARCH_RESULT, [
618 result="`echo \"$1\" | grep echo`"
619 if test "x$1" = "xerror" -o "x$result" != "x"; then
620 AC_STEPMAKE_WARN(can\'t find $2. $3)
625 # Configure paths for GTK+
626 # Owen Taylor 97-11-3
628 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
629 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
631 AC_DEFUN(AM_PATH_GTK,
633 dnl Get the cflags and libraries from the gtk-config script
635 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
636 min_gtk_version=ifelse([$1], ,1.1.1,$1)
637 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
639 if test "$GTK_CONFIG" != "no" ; then
640 GTK_CFLAGS=`$GTK_CONFIG --cflags`
641 GTK_LIBS=`$GTK_CONFIG --libs`
642 ac_save_CFLAGS="$CFLAGS"
644 ac_save_CXXFLAGS="$CXXFLAGS"
645 CFLAGS="$CFLAGS $GTK_CFLAGS"
646 CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
647 LIBS="$LIBS $GTK_LIBS"
649 dnl Now check if the installed GTK is sufficiently new. (Also sanity
650 dnl checks the results of gtk-config to some extent
659 int major, minor, micro;
661 if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) {
662 printf("%s, bad version string\n", "$min_gtk_version");
666 return !((gtk_major_version > major) ||
667 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
668 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)));
670 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
671 CFLAGS="$ac_save_CFLAGS"
672 CXXFLAGS="$ac_save_CXXFLAGS"
677 if test "x$no_gtk" = x ; then
679 ifelse([$2], , :, [$2])
684 ifelse([$3], , :, [$3])
686 CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
693 # Configure paths for GTK--
694 # Erik Andersen 30 May 1998
695 # Modified by Tero Pulkkinen (added the compiler checks... I hope they work..)
697 dnl Test for GTK__, and define GTK___CFLAGS and GTK___LIBS
698 dnl to be used as follows:
699 dnl AM_PATH_GTKMM([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
702 dnl Get the cflags and libraries from the gtkmm-config script
704 AC_ARG_WITH(gtkmm-prefix,[ --with-gtkmm-prefix=PREFIX
705 Prefix where GTK-- is installed (optional)],
706 gtkmm_config_prefix="$withval", gtkmm_config_prefix="")
707 AC_ARG_WITH(gtkmm-exec-prefix,[ --with-gtkmm-exec-prefix=PREFIX
708 Exec prefix where GTK-- is installed (optional)],
709 gtkmm_config_exec_prefix="$withval", gtkmm_config_exec_prefix="")
710 AC_ARG_ENABLE(gtkmmtest, [ --disable-gtkmmtest Do not try to compile and run a test GTK-- program],
711 , enable_gtkmmtest=yes)
713 if test x$gtkmm_config_exec_prefix != x ; then
714 gtkmm_config_args="$gtkmm_config_args --exec-prefix=$gtkmm_config_exec_prefix"
715 if test x${GTKMM_CONFIG+set} != xset ; then
716 GTKMM_CONFIG=$gtkmm_config_exec_prefix/bin/gtkmm-config
719 if test x$gtkmm_config_prefix != x ; then
720 gtkmm_config_args="$gtkmm_config_args --prefix=$gtkmm_config_prefix"
721 if test x${GTKMM_CONFIG+set} != xset ; then
722 GTKMM_CONFIG=$gtkmm_config_prefix/bin/gtkmm-config
727 AC_DEFUN(AM_PATH_GTKMM,
731 dnl Check check if the installed GTK-- is sufficiently new.
733 AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
734 min_gtkmm_version=ifelse([$1], ,0.9.14,$1)
736 AC_MSG_CHECKING(for GTK-- - version >= $min_gtkmm_version)
738 if test "$GTKMM_CONFIG" = "no" ; then
744 GTK___CFLAGS=`$GTKMM_CONFIG $gtkmm_config_args --cflags`
745 GTK___LIBS=`$GTKMM_CONFIG $gtkmm_config_args --libs`
746 gtkmm_config_major_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
747 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
748 gtkmm_config_minor_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
749 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
750 gtkmm_config_micro_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
751 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
752 if test "x$enable_gtkmmtest" = "xyes" ; then
753 ac_save_CXXFLAGS="$CXXFLAGS"
755 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
756 LIBS="$LIBS $GTK___LIBS"
758 dnl Now check if the installed GTK-- is sufficiently new. (Also sanity
759 dnl checks the results of gtkmm-config to some extent
770 int major, minor, micro;
773 system ("touch conf.gtkmmtest");
775 /* HP/UX 0 (%@#!) writes to sscanf strings */
776 tmp_version = g_strdup("$min_gtkmm_version");
777 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
778 printf("%s, bad version string\n", "$min_gtkmm_version");
782 if ((gtkmm_major_version != $gtkmm_config_major_version) ||
783 (gtkmm_minor_version != $gtkmm_config_minor_version) ||
784 (gtkmm_micro_version != $gtkmm_config_micro_version))
786 printf("\n*** 'gtkmm-config --version' returned %d.%d.%d, but GTK-- (%d.%d.%d)\n",
787 $gtkmm_config_major_version, $gtkmm_config_minor_version, $gtkmm_config_micro_version,
788 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
789 printf ("*** was found! If gtkmm-config was correct, then it is best\n");
790 printf ("*** to remove the old version of GTK--. You may also be able to fix the error\n");
791 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
792 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
793 printf("*** required on your system.\n");
794 printf("*** If gtkmm-config was wrong, set the environment variable GTKMM_CONFIG\n");
795 printf("*** to point to the correct copy of gtkmm-config, and remove the file config.cache\n");
796 printf("*** before re-running configure\n");
798 /* GTK-- does not have the GTKMM_*_VERSION constants */
800 else if ((gtkmm_major_version != GTKMM_MAJOR_VERSION) ||
801 (gtkmm_minor_version != GTKMM_MINOR_VERSION) ||
802 (gtkmm_micro_version != GTKMM_MICRO_VERSION))
804 printf("*** GTK-- header files (version %d.%d.%d) do not match\n",
805 GTKMM_MAJOR_VERSION, GTKMM_MINOR_VERSION, GTKMM_MICRO_VERSION);
806 printf("*** library (version %d.%d.%d)\n",
807 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
812 if ((gtkmm_major_version > major) ||
813 ((gtkmm_major_version == major) && (gtkmm_minor_version > minor)) ||
814 ((gtkmm_major_version == major) && (gtkmm_minor_version == minor) && (gtkmm_micro_version >= micro)))
820 printf("\n*** An old version of GTK-- (%d.%d.%d) was found.\n",
821 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
822 printf("*** You need a version of GTK-- newer than %d.%d.%d. The latest version of\n",
823 major, minor, micro);
824 printf("*** GTK-- is always available from ftp://ftp.gtk.org.\n");
826 printf("*** If you have already installed a sufficiently new version, this error\n");
827 printf("*** probably means that the wrong copy of the gtkmm-config shell script is\n");
828 printf("*** being found. The easiest way to fix this is to remove the old version\n");
829 printf("*** of GTK--, but you can also set the GTKMM_CONFIG environment to point to the\n");
830 printf("*** correct copy of gtkmm-config. (In this case, you will have to\n");
831 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
832 printf("*** so that the correct libraries are found at run-time))\n");
837 ],, no_gtkmm=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
838 CXXFLAGS="$ac_save_CXXFLAGS"
842 if test "x$no_gtkmm" = x ; then
844 ifelse([$2], , :, [$2])
847 if test "$GTKMM_CONFIG" = "no" ; then
848 echo "*** The gtkmm-config script installed by GTK-- could not be found"
849 echo "*** If GTK-- was installed in PREFIX, make sure PREFIX/bin is in"
850 echo "*** your path, or set the GTK_CONFIG environment variable to the"
851 echo "*** full path to gtk-config."
852 echo "*** The gtkmm-config script was not available in GTK-- versions"
853 echo "*** prior to 0.9.12. Perhaps you need to update your installed"
854 echo "*** version to 0.9.12 or later"
856 if test -f conf.gtkmmtest ; then
859 echo "*** Could not run GTK-- test program, checking why..."
860 CXXFLAGS="$CFLAGS $GTKMM_CXXFLAGS"
861 LIBS="$LIBS $GTK___LIBS"
865 ], [ return ((gtkmm_major_version) || (gtkmm_minor_version) || (gtkmm_micro_version)); ],
866 [ echo "*** The test program compiled, but did not run. This usually means"
867 echo "*** that the run-time linker is not finding GTK-- or finding the wrong"
868 echo "*** version of GTK--. If it is not finding GTK--, you'll need to set your"
869 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
870 echo "*** to the installed location Also, make sure you have run ldconfig if that"
871 echo "*** is required on your system"
873 echo "*** If you have an old version installed, it is best to remove it, although"
874 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
875 [ echo "*** The test program failed to compile or link. See the file config.log for the"
876 echo "*** exact error that occured. This usually means GTK-- was incorrectly installed"
877 echo "*** or that you have moved GTK-- since it was installed. In the latter case, you"
878 echo "*** may want to edit the gtkmm-config script: $GTKMM_CONFIG" ])
879 CXXFLAGS="$ac_save_CXXFLAGS"
885 ifelse([$3], , :, [$3])
888 AC_SUBST(GTK___CFLAGS)
893 # Configure paths for GTK--DRAW
894 # Derek Quinn Wyatt 98-08-21 (adapted from Jan Nieuwenhuizen's code)
896 dnl AM_PATH_GTK__DRAW([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
897 dnl Test for GTK--DRAW, and define GTK___CFLAGS and GTK___LIBS
899 AC_DEFUN(AM_PATH_GTK__DRAW,
901 dnl Get the cflags and libraries from the gtk__-config script
903 AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
904 min_gtk___version=ifelse([$1], ,0.0.5,$1)
905 AC_MSG_CHECKING(for GTK--DRAW - version >= $min_gtk___version)
907 if test "$GTKMM_CONFIG" != "no" ; then
908 GTK___CFLAGS=`$GTKMM_CONFIG --cflags`
909 GTK___LIBS=`$GTKMM_CONFIG --libs`
910 GTK___DLIBS="$GTK___LIBS -lgtkmmdraw"
911 GTK___LIBS="$GTK___DLIBS"
912 ac_save_CFLAGS="$CFLAGS"
914 ac_save_CXXFLAGS="$CXXFLAGS"
915 CFLAGS="$CFLAGS $GTK___CFLAGS"
916 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
917 LIBS="$LIBS $GTK___LIBS"
919 dnl Now check if the installed GTK__ is sufficiently new. (Also sanity
920 dnl checks the results of gtk__-config to some extent
932 ],, no_gtk__=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
933 CFLAGS="$ac_save_CFLAGS"
934 CXXFLAGS="$ac_save_CXXFLAGS"
939 if test "x$no_gtk__" = x ; then
941 ifelse([$2], , :, [$2])
946 ifelse([$3], , :, [$3])
948 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
950 AC_SUBST(GTK___CFLAGS)