X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fhelmpot%2Fconfigure.in;h=3d31a0d548439b13170ae4c321406bde60ddbb44;hb=97c2d258a5c524eb5c4b85208899d80751a2c82f;hp=b36ac29daf88c561ccb70377050ee5c8aad2738b;hpb=75967c868f11708ad64e881dbe15a38718e441b7;p=helm.git diff --git a/helm/helmpot/configure.in b/helm/helmpot/configure.in index b36ac29da..3d31a0d54 100644 --- a/helm/helmpot/configure.in +++ b/helm/helmpot/configure.in @@ -2,8 +2,8 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(main.c) HELMPOT_MAJOR_VERSION=0 -HELMPOT_MINOR_VERSION=0 -HELMPOT_MICRO_VERSION=4 +HELMPOT_MINOR_VERSION=1 +HELMPOT_MICRO_VERSION=0 HELMPOT_VERSION=$HELMPOT_MAJOR_VERSION.$HELMPOT_MINOR_VERSION.$HELMPOT_MICRO_VERSION VERSION=$HELMPOT_VERSION @@ -42,41 +42,19 @@ dnl Check for iconv with const pointer as second argument AC_LANG_C dnl Checks for libraries -AC_CHECK_LIB(gtk, gtk_window_new, - [ - CFLAGS="$CFLAGS `gtk-config --cflags`" - CXXFLAGS="$CXXFLAGS `gtk-config --cflags`" - LIBS="$LIBS `gtk-config --libs`" - ], - AC_MSG_ERROR(could not find GTK), - `gtk-config --libs` -) +AM_PATH_GTK(1.2.0, gtklib="yes", gtklib="no") -AC_CHECK_LIB(minidom, mdom_node_get_type, - [ - CFLAGS="$CFLAGS `minidom-config --cflags`" - CXXFLAGS="$CXXFLAGS `minidom-config --cflags`" - LIBS="$LIBS `minidom-config --libs`" - ], - AC_MSG_ERROR(could not find minidom), - `minidom-config --libs` `glib-config --libs` -) - -vers=`minidom-config --version | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` -minvers=`echo 0.1.3 | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` -if test "$vers" -lt "$minvers"; then - AC_MSG_ERROR(you need at least minidom 0.1.3) +if test $gtklib = "no"; then + AC_MSG_ERROR(GTK is needed in order to use helmpot) fi -AC_CHECK_LIB(gtkmathview, gtk_math_view_new, - [ - CFLAGS="$CFLAGS `gtkmathview-config --cflags`" - CXXFLAGS="$CXXFLAGS `gtkmathview-config --cflags`" - LIBS="$LIBS `gtkmathview-config --libs`" - ], - AC_MSG_ERROR(cound not find gtkmathview), - `gtkmathview-config --libs` -) +CFLAGS="$CFLAGS @GTKMATHVIEW_CFLAGS@" +CXXFLAGS="$CXXFLAGS @GTKMATHVIEW_CFLAGS@" +LIBS="$LIBS @GTKMATHVIEW_LIBS@" + +PKG_CHECK_MODULES(GTKMATHVIEW, gtkmathview >= 0.3.0,, AC_MSG_ERROR(could not find gtkmathview)) +AC_SUBST(GTKMATHVIEW_CFLAGS) +AC_SUBST(GTKMATHVIEW_LIBS) if test $HAVE_COLORGCC = "yes"; then CC=colorgcc