diff options
author | Colin Walters <walters@verbum.org> | 2012-08-14 20:27:17 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2012-08-14 20:27:17 -0400 |
commit | d734a06dc613f81bde3ffa1bfb30b971bac462d6 (patch) | |
tree | 18bce3625292dd84ef7f199206566e79c58a68ee /configure.ac | |
parent | 0e13b86146eaa2fd58fc5165b11eb4f8396108fa (diff) | |
download | gobject-introspection-d734a06dc613f81bde3ffa1bfb30b971bac462d6.tar.gz |
build: Ensure cairo-gobject always ends up in cairo.gir
We were conditionalizing on the presence of cairo in the buildroot,
but that's super lame since it makes a huge mess of the build
dependency graph.
Let's just always stick cairo-gobject in there. I doubt anyone cares
anymore about building g-i on really old systems without it.
If they do...well, we can revisit this again.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 86 |
1 files changed, 40 insertions, 46 deletions
diff --git a/configure.ac b/configure.ac index 07534b24..3273d673 100644 --- a/configure.ac +++ b/configure.ac @@ -130,57 +130,44 @@ PKG_CHECK_MODULES(GIO, [gio-2.0]) PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0], have_gio_unix=true, have_gio_unix=false) AM_CONDITIONAL(HAVE_GIO_UNIX, test x$have_gio_unix = xtrue) -AC_ARG_ENABLE(tests,[ --disable-tests disable test libraries ], enable_tests=$enableval,enable_tests=yes) -have_cairo=no -PKG_CHECK_MODULES(CAIRO, [cairo cairo-gobject], have_cairo=yes, have_cairo=no) -if test x$have_cairo != xyes && test x$enable_tests != xno; then - AC_MSG_ERROR([Tests enabled but cairo not found; pass --disable-tests or install cairo]) -fi +AC_ARG_ENABLE(tests, + AS_HELP_STRING([--disable-tests], [disable test libraries]), + enable_tests=$enableval, + enable_tests=maybe) + +AS_IF([test x${enable_tests} != xno], [ + PKG_CHECK_MODULES(CAIRO, [cairo cairo-gobject], have_cairo=yes, have_cairo=no) + AS_IF([test x$have_cairo != xyes], [ + AS_IF([ test x$enable_tests = xmaybe ], [ + enable_tests=no + ], [ + AC_MSG_ERROR([Tests enabled but cairo not found; pass --disable-tests or install cairo]) + ]) + ], [ + enable_tests=yes + ]) +]) +AM_CONDITIONAL(BUILD_TESTS, test x$enable_tests != xno) -have_cairo_gobject=no -if test x$have_cairo = xyes; then - PKG_CHECK_MODULES(CAIRO_GOBJECT, [cairo-gobject], have_cairo_gobject=yes, have_cairo_gobject=no) -fi +case "$host" in + *-*-darwin*) + CAIRO_SHARED_LIBRARY="libcairo-gobject.2.dylib" + ;; + *-*-mingw*) + CAIRO_SHARED_LIBRARY="libcairo-gobject-2.dll" + ;; + *-*-openbsd*) + CAIRO_SHARED_LIBRARY="libcairo-gobject.so" + ;; + *) + CAIRO_SHARED_LIBRARY="libcairo-gobject.so.2" + ;; +esac +CAIRO_GIR_PACKAGE="cairo-gobject" -if test x$have_cairo_gobject = xyes; then - case "$host" in - *-*-darwin*) - CAIRO_SHARED_LIBRARY="libcairo-gobject.2.dylib" - ;; - *-*-mingw*) - CAIRO_SHARED_LIBRARY="libcairo-gobject-2.dll" - ;; - *-*-openbsd*) - CAIRO_SHARED_LIBRARY="libcairo-gobject.so" - ;; - *) - CAIRO_SHARED_LIBRARY="libcairo-gobject.so.2" - ;; - esac - CAIRO_GIR_PACKAGE="cairo-gobject" -elif test x$have_cairo = xyes; then - case "$host" in - *-*-darwin*) - CAIRO_SHARED_LIBRARY="libcairo.2.dylib" - ;; - *-*-mingw*) - CAIRO_SHARED_LIBRARY="libcairo-2.dll" - ;; - *-*-openbsd*) - CAIRO_SHARED_LIBRARY="libcairo.so" - ;; - *) - CAIRO_SHARED_LIBRARY="libcairo.so.2" - ;; - esac - CAIRO_GIR_PACKAGE="cairo" -fi AC_SUBST(CAIRO_SHARED_LIBRARY) AC_SUBST(CAIRO_GIR_PACKAGE) -AM_CONDITIONAL(BUILD_TESTS, test x$enable_tests != xno) -AM_CONDITIONAL(HAVE_CAIRO, test x$have_cairo != xno) -AM_CONDITIONAL(HAVE_CAIRO_GOBJECT, test x$have_cairo_gobject != xno) PKG_CHECK_MODULES(SCANNER, [gobject-2.0 gio-2.0]) @@ -309,3 +296,10 @@ docs/reference/Makefile gobject-introspection-1.0.pc gobject-introspection-no-export-1.0.pc]) AC_OUTPUT + +echo " + gobject-introspection $VERSION + =============== + + tests: ${enable_tests} +" |