1 dnl Process this file with autoconf to produce a configure script.
4 HELMPOT_MAJOR_VERSION=0
5 HELMPOT_MINOR_VERSION=1
6 HELMPOT_MICRO_VERSION=0
7 HELMPOT_VERSION=$HELMPOT_MAJOR_VERSION.$HELMPOT_MINOR_VERSION.$HELMPOT_MICRO_VERSION
8 VERSION=$HELMPOT_VERSION
10 AC_SUBST(HELMPOT_VERSION)
14 [ --enable-checks[=ARG] include debugging checks [default=yes]],
16 if test $enableval = yes; then
17 AC_DEFINE(ENABLE_CHECKS)
20 AC_DEFINE(ENABLE_CHECKS)
23 dnl Automake configuration
24 AM_CONFIG_HEADER(config.h)
25 AM_INIT_AUTOMAKE(helmpot, $HELMPOT_VERSION)
27 dnl Checks for programs.
31 AC_CHECK_PROG(HAVE_COLORGCC, colorgcc, yes, no)
33 dnl Checks for header files.
35 AC_CHECK_HEADERS(unistd.h)
38 dnl Checks for typedefs, structures, and compiler characteristics.
41 dnl Check for iconv with const pointer as second argument
44 dnl Checks for libraries
45 AM_PATH_GTK(1.2.0, gtklib="yes", gtklib="no")
47 if test $gtklib = "no"; then
48 AC_MSG_ERROR(GTK is needed in order to use helmpot)
51 AC_CHECK_PROG(HAVE_GTKMATHVIEW_CONFIG, gtkmathview-config, yes, no)
52 if test $HAVE_GTKMATHVIEW_CONFIG = "no"; then
53 AC_MSG_ERROR(gtkmathview is required)
56 GTKMATHVIEW_MIN_VERSION=0.3.0
57 AC_MSG_CHECKING(for gtkmathview >= $GTKMATHVIEW_MIN_VERSION)
58 vers=`gtkmathview-config --version | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
59 minvers=`echo $GTKMATHVIEW_MIN_VERSION | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
60 if test "$vers" -lt "$minvers"; then
61 AC_MSG_RESULT(not found)
62 AC_MSG_ERROR(gtkmathview >= $GTKMATHVIEW_MIN_VERSION is required)
67 CFLAGS="$CFLAGS `gtkmathview-config --cflags`"
68 CXXFLAGS="$CXXFLAGS `gtkmathview-config --cflags`"
69 LIBS="$LIBS `gtkmathview-config --libs`"
71 if test $HAVE_COLORGCC = "yes"; then
76 CFLAGS="$CFLAGS -W -Wall"
77 CXXFLAGS="$CXXFLAGS -W -Wall"