1 dnl Process this file with autoconf to produce a configure script.
3 AC_CONFIG_SRCDIR([src/TToken.hh])
7 EDITEX_VERSION_INFO=`echo $VERSION | awk -F. '{ printf "%d:%d:%d", $1+$2, $3, $2 }'`
8 AC_SUBST(EDITEX_VERSION_INFO)
12 [ --enable-profile[=ARG] include profiling information [default=no]],
19 [ --enable-debug[=ARG] include debugging debug [default=yes]],
20 enable_debug=$enableval,
24 if test "x$enable_debug" = "xyes"; then
25 AC_DEFINE(ENABLE_DEBUG,,[Define to 1 if you want to enable validity checks while running])
29 AC_ARG_WITH(gmetadom-prefix,
30 [ --with-gmetadom-prefix=[PFX] Specify location of gmetadom],
31 GMETADOM_PREFIX=$withval
34 AC_CONFIG_HEADERS([config.h])
35 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
36 AM_CONFIG_HEADER(config.h)
39 /* Copyright (C) 2002, Luca Padovani <luca.padovani@cs.unibo.it>.
41 * This file is part of EdiTeX, an editor of mathematical
42 * expressions based on TeX syntax
44 * EdiTeX is free software; you can redistribute it and/or
45 * modify it under the terms of the GNU General Public License
46 * as published by the Free Software Foundation; either version 2
47 * of the License, or (at your option) any later version.
49 * EdiTeX is distributed in the hope that it will be useful,
50 * but WITHOUT ANY WARRANTY; without even the implied warranty of
51 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52 * GNU General Public License for more details.
54 * You should have received a copy of the GNU General Public License
55 * along with EdiTeX; if not, write to the Free Software
56 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
58 * For details, see the EdiTeX World-Wide-Web page,
59 * http://helm.cs.unibo.it/editex, or send a mail to
60 * <luca.padovani@cs.unibo.it>
81 GMETADOM_CONFIG="gmetadom-config"
82 GMETADOM_MIN_VERSION=0.1.0
83 AC_MSG_CHECKING([for GMetaDOM C++ library] >= $GMETADOM_MIN_VERSION)
84 if test "x$GMETADOM_PREFIX" != "x"
86 if ${GMETADOM_PREFIX}/bin/$GMETADOM_CONFIG --version > /dev/null 2>&1
88 GMETADOM_CONFIG=${GMETADOM_PREFIX}/bin/$GMETADOM_CONFIG
89 elif ! $GMETADOM_CONFIG --version > /dev/null 2>&1
91 AC_MSG_ERROR([Could not find gmetadom anywhere (see config.log for details).])
96 dnl test version and init our variables
98 vers=`$GMETADOM_CONFIG --version | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
99 minvers=`echo $GMETADOM_MIN_VERSION | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
100 if test "$vers" -ge "$minvers"
102 GMETADOM_LIBS="`$GMETADOM_CONFIG --module=gdome_cpp_smart --libs`"
103 GMETADOM_CFLAGS="`$GMETADOM_CONFIG --module=gdome_cpp_smart --cflags`"
106 AC_MSG_ERROR([You need at least GMetaDOM (C++) $GMETADOM_MIN_VERSION for this version of $PACKAGE])
109 AC_SUBST(GMETADOM_CFLAGS)
110 AC_SUBST(GMETADOM_LIBS)
112 GDOMEXSLT_CONFIG="gdome_xslt_cpp_smart-config"
113 GDOMEXSLT_MIN_VERSION=0.0.1
114 AC_MSG_CHECKING([for gdome_xslt C++ library] >= $GDOMEXSLT_MIN_VERSION)
115 if test "x$GDOMEXSLT_PREFIX" != "x"
117 if ${GDOMEXSLT_PREFIX}/bin/$GDOMEXSLT_CONFIG --version > /dev/null 2>&1
119 GDOMEXSLT_CONFIG=${GDOMEXSLT_PREFIX}/bin/$GDOMEXSLT_CONFIG
120 elif ! $GDOMEXSLT_CONFIG --version > /dev/null 2>&1
122 AC_MSG_ERROR([Could not find gdome_xslt anywhere (see config.log for details).])
127 dnl test version and init our variables
129 vers=`$GDOMEXSLT_CONFIG --version | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
130 minvers=`echo $GDOMEXSLT_MIN_VERSION | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
131 if test "$vers" -ge "$minvers"
133 GDOMEXSLT_LIBS="`$GDOMEXSLT_CONFIG --libs`"
134 GDOMEXSLT_CFLAGS="`$GDOMEXSLT_CONFIG --cflags`"
137 AC_MSG_ERROR([You need at least gdome_xslt (C++) $GDOMEXSLT_MIN_VERSION for this version of $PACKAGE])
140 AC_SUBST(GDOMEXSLT_CFLAGS)
141 AC_SUBST(GDOMEXSLT_LIBS)
143 GTKMATHVIEW_CONFIG="gtkmathview-config"
144 GTKMATHVIEW_MIN_VERSION=0.4.0
145 AC_MSG_CHECKING([for gtkmathview library] >= $GTKMATHVIEW_MIN_VERSION)
146 if test "x$GTKMATHVIEW_PREFIX" != "x"
148 if ${GTKMATHVIEW_PREFIX}/bin/$GTKMATHVIEW_CONFIG --version > /dev/null 2>&1
150 GTKMATHVIEW_CONFIG=${GTKMATHVIEW_PREFIX}/bin/$GTKMATHVIEW_CONFIG
151 elif ! $GTKMATHVIEW_CONFIG --version > /dev/null 2>&1
153 AC_MSG_ERROR([Could not find gtkmathview anywhere (see config.log for details).])
158 dnl test version and init our variables
160 vers=`$GTKMATHVIEW_CONFIG --version | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
161 minvers=`echo $GTKMATHVIEW_MIN_VERSION | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
162 if test "$vers" -ge "$minvers"
164 GTKMATHVIEW_LIBS="`$GTKMATHVIEW_CONFIG --libs`"
165 GTKMATHVIEW_CFLAGS="`$GTKMATHVIEW_CONFIG --cflags`"
168 AC_MSG_ERROR([You need at least gtkmathview $GTKMATHVIEW_MIN_VERSION for this version of $PACKAGE])
171 AC_SUBST(GTKMATHVIEW_CFLAGS)
172 AC_SUBST(GTKMATHVIEW_LIBS)
180 AC_CONFIG_COMMANDS([default],[[chmod +x editex-config]],[[]])