Skip to content

Commit

Permalink
Add support for GooCanvas 3
Browse files Browse the repository at this point in the history
If GooCanvas 2 is not available, check for version 3.
Issue #246.
  • Loading branch information
csete committed Feb 20, 2021
1 parent 2b8c851 commit 86fb71a
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,19 @@ else
AC_MSG_ERROR(Gpredict requires libglib-dev 2.40 or later)
fi

# check for goocanvas (depends on gtk and glib)
# check for goocanvas 2 or 3 (depends on gtk and glib)
if $PKG_CONFIG --atleast-version=2.0 goocanvas-2.0; then
CFLAGS="$CFLAGS `$PKG_CONFIG --cflags goocanvas-2.0`"
LIBS="$LIBS `$PKG_CONFIG --libs goocanvas-2.0`"
havegoocanvas2=true
else
AC_MSG_ERROR(Gpredict requires libgoocanvas-2.0-dev)
if $PKG_CONFIG --atleast-version=3.0 goocanvas-3.0; then
CFLAGS="$CFLAGS `$PKG_CONFIG --cflags goocanvas-3.0`"
LIBS="$LIBS `$PKG_CONFIG --libs goocanvas-3.0`"
havegoocanvas3=true
else
AC_MSG_ERROR(Gpredict requires libgoocanvas-2.0-dev)
fi
fi

# check for libgps (optional)
Expand Down Expand Up @@ -98,8 +105,13 @@ GIO_V=`$PKG_CONFIG --modversion gio-2.0`
GTHR_V=`$PKG_CONFIG --modversion gthread-2.0`
GDK_V=`$PKG_CONFIG --modversion gdk-3.0`
GTK_V=`$PKG_CONFIG --modversion gtk+-3.0`
GOOC_V=`$PKG_CONFIG --modversion goocanvas-2.0`
CURL_V=`$PKG_CONFIG --modversion libcurl`
if test "$havegoocanvas2" = true ; then
GOOC_V=`$PKG_CONFIG --modversion goocanvas-2.0`
fi
if test "$havegoocanvas3" = true ; then
GOOC_V=`$PKG_CONFIG --modversion goocanvas-3.0`
fi
if test "$havelibgps" = true ; then
GPS_V=`$PKG_CONFIG --modversion libgps`
fi
Expand Down

0 comments on commit 86fb71a

Please sign in to comment.