]> matita.cs.unibo.it Git - helm.git/blob - helm/helmpot/configure.in
...
[helm.git] / helm / helmpot / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(main.c)
3
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
9
10 AC_SUBST(HELMPOT_VERSION)
11
12 AC_ARG_ENABLE(
13         checks,
14         [  --enable-checks[=ARG]   include debugging checks [default=yes]],
15         [
16                 if test $enableval = yes; then
17                         AC_DEFINE(ENABLE_CHECKS)
18                 fi
19         ],
20         AC_DEFINE(ENABLE_CHECKS)
21 )
22
23 dnl Automake configuration
24 AM_CONFIG_HEADER(config.h)
25 AM_INIT_AUTOMAKE(helmpot, $HELMPOT_VERSION)
26
27 dnl Checks for programs.
28 AC_LANG_C
29 AC_PROG_CC
30 AC_ISC_POSIX
31 AC_CHECK_PROG(HAVE_COLORGCC, colorgcc, yes, no)
32
33 dnl Checks for header files.
34 AC_HEADER_STDC
35 AC_CHECK_HEADERS(unistd.h)
36 AC_FUNC_VFORK
37
38 dnl Checks for typedefs, structures, and compiler characteristics.
39 AC_C_CONST
40
41 dnl Check for iconv with const pointer as second argument
42 AC_LANG_C
43
44 dnl Checks for libraries
45 AM_PATH_GTK(1.2.0, gtklib="yes", gtklib="no")
46
47 if test $gtklib = "no"; then
48         AC_MSG_ERROR(GTK is needed in order to use helmpot)
49 fi
50
51 CFLAGS="$CFLAGS @GTKMATHVIEW_CFLAGS@"
52 CXXFLAGS="$CXXFLAGS @GTKMATHVIEW_CFLAGS@"
53 LIBS="$LIBS @GTKMATHVIEW_LIBS@"
54
55 PKG_CHECK_MODULES(GTKMATHVIEW, gtkmathview >= 0.3.0,, AC_MSG_ERROR(could not find gtkmathview))
56 AC_SUBST(GTKMATHVIEW_CFLAGS)
57 AC_SUBST(GTKMATHVIEW_LIBS)
58
59 if test $HAVE_COLORGCC = "yes"; then
60         CC=colorgcc
61         CXX=colorgcc
62 fi
63
64 CFLAGS="$CFLAGS -W -Wall"
65 CXXFLAGS="$CXXFLAGS -W -Wall"
66
67 AC_OUTPUT([
68 Makefile
69 helmpot.spec
70 ])