--- configure.ac.old 2008-02-27 16:45:53.000000000 +0100 +++ configure.ac 2008-05-01 16:15:12.000000000 +0200 @@ -347,12 +347,16 @@ DEP_CFLAGS=`$PKG_CONFIG --cflags $GLIB_PACKAGES gthread-2.0` DEP_LIBS=`$PKG_CONFIG --libs $GLIB_PACKAGES gthread-2.0` +AC_ARG_WITH([gtk], AS_HELP_STRING([--without-gtk], [Build without gtk (default: test)])) + +if test "x$with_gtk" != "xno"; then PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED_VERSION, have_gtk="yes" AC_DEFINE(HAVE_GTK, 1, [Define to 1 to compile with gtk support.]) GTK_CFLAGS="$GTK_CFLAGS" GTK_LIBS="$GTK_LIBS", have_gtk="no (gtk+ not found)") +fi AM_CONDITIONAL(HAVE_GTK, test "x$have_gtk" = "xyes") AC_SUBST(GTK_CFLAGS) @@ -406,10 +410,14 @@ # Checks for gtk-doc and docbook-tools ###################################### +AC_ARG_WITH([gtk-doc], AS_HELP_STRING([--without-gtk-doc], [Build without gtk-doc (default: test)])) + +if test "x$with_gtk-doc" != "xno"; then GTK_DOC_CHECK([1.0]) dnl NOTE: We need to use a separate automake conditional for this dnl to make this work with the tarballs. +fi AM_CONDITIONAL(ENABLE_GTK_DOC, test "x$enable_gtk_doc" = "xyes") AC_CHECK_PROGS(PERL, perl5 perl) @@ -418,12 +426,16 @@ ############### # Check for Lua ############### +AC_ARG_WITH([lua], AS_HELP_STRING([--without-lua], [Build without lua (default: test)])) +if test "x$with_lua" != "xno"; then PKG_CHECK_MODULES(LUA, lua >= $LUA_REQUIRED_VERSION, have_lua="yes", [PKG_CHECK_MODULES(LUA, lua5.1 >= $LUA_REQUIRED_VERSION, have_lua="yes", have_lua="no (usable lua not found)")]) +fi + AM_CONDITIONAL(HAVE_LUA, test "x$have_lua" = "xyes") AC_SUBST(LUA_CFLAGS) @@ -433,7 +445,9 @@ ####################################### # Checks for Ruby used to make API docs ####################################### - +AC_ARG_WITH([ruby], AS_HELP_STRING([--without-ruby], [Build without ruby (default: test)])) + +if test "x$with_ruby" != "xno"; then AC_CHECK_PROG(RUBY, ruby, yes, no) if test "$RUBY" = "no"; then AC_MSG_WARN([ @@ -445,6 +459,7 @@ RUBY_BIN="$RUBY" have_ruby=yes fi +fi AM_CONDITIONAL(HAVE_RUBY, test "x$have_ruby" = "xyes") AC_SUBST(RUBY_BIN) @@ -454,9 +469,14 @@ # Check for Cairo ################# +AC_ARG_WITH([cairo], AS_HELP_STRING([--without-cairo], [Build without cairo librairy (default: test)])) + +if test "x$with_cairo" != "xno"; then PKG_CHECK_MODULES(CAIRO, cairo, have_cairo="yes", have_cairo="no (usable cairo not found)") +fi + AM_CONDITIONAL(HAVE_CAIRO, test "x$have_cairo" = "xyes") AC_SUBST(CAIRO_CFLAGS) @@ -467,16 +487,22 @@ # Checks for Pango stuff ######################## +AC_ARG_WITH([pango], AS_HELP_STRING([--without-pango], [Build without pango librairy (default: test)])) + +if test "x$with_pango" != "xno"; then PKG_CHECK_MODULES(PANGO, pango, have_pango="yes", have_pango="no (usable pango not found)") -AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes") PKG_CHECK_MODULES(PANGOCAIRO, pangocairo, have_pangocairo="yes", have_pangocairo="no (usable pangocairo not found)") +fi + AM_CONDITIONAL(HAVE_PANGOCAIRO, test "x$have_pangocairo" = "xyes") +AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes") + AC_SUBST(PANGO_CFLAGS) AC_SUBST(PANGO_LIBS) AC_SUBST(PANGOCAIRO_CFLAGS) @@ -487,9 +513,14 @@ # Check for gdk-pixbuf ###################### +AC_ARG_WITH([gdk-pixbuf], AS_HELP_STRING([--without-gdk-pixbuf], [Build without gdk-pixbuf librairy (default: test)])) + +if test "x$with_gdk-pixbuf" != "xno"; then PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= gtk_required_version, have_gdk_pixbuf="yes", have_gdk_pixbuf="no (gdk-pixbuf not found)") +fi + AM_CONDITIONAL(HAVE_GDK_PIXBUF, test "x$have_gdk_pixbuf" = "xyes") @@ -536,9 +567,15 @@ # Check for libpng ################## +AC_ARG_WITH([libpng], AS_HELP_STRING([--without-libpng], [Build without libpng librairy (default: test)])) + +if test "x$with_libpng" != "xno"; then + PKG_CHECK_MODULES(PNG, libpng, have_libpng="yes", have_libpng="no (usable libpng not found)") +fi + AM_CONDITIONAL(HAVE_PNG, test "x$have_libpng" = "xyes") AC_SUBST(PNG_CFLAGS) @@ -549,9 +586,14 @@ # Check for librsvg ################### +AC_ARG_WITH([librsvg], AS_HELP_STRING([--without-librsvg], [Build without librsvg librairy (default: test)])) + +if test "x$with_librsvg" != "xno"; then PKG_CHECK_MODULES(RSVG, librsvg-2.0 >= librsvg_required_version, have_librsvg="yes", have_librsvg="no (usable librsvg not found)") +fi + AM_CONDITIONAL(HAVE_RSVG, test "x$have_librsvg" = "xyes") AC_SUBST(RSVG_CFLAGS) @@ -562,9 +604,13 @@ # Check for OpenEXR ################### +AC_ARG_WITH([openexr], AS_HELP_STRING([--without-openexr], [Build without openexr librairy (default: test)])) + + if test "x$with_openexr" != "xno"; then PKG_CHECK_MODULES(OPENEXR, OpenEXR, have_openexr="yes", have_openexr="no (usable OpenEXR not found)") +fi AM_CONDITIONAL(HAVE_OPENEXR, test "x$have_openexr" = "xyes") AC_SUBST(OPENEXR_CFLAGS) @@ -575,6 +621,9 @@ # Check for SDL ############### +AC_ARG_WITH([sdl], AS_HELP_STRING([--without-sdl], [Build without sdl librairy (default: test)])) + +if test "x$with_sdl" != "xno"; then dnl check for SDL AC_PATH_PROG(SDL_CONFIG, sdl-config, no) if test "$SDL_CONFIG" = "no"; then @@ -585,6 +634,7 @@ SDL_CFLAGS=`$SDL_CONFIG --cflags` SDL_LIBS=`$SDL_CONFIG --libs` fi +fi AM_CONDITIONAL(HAVE_SDL, test "x$have_sdl" = "xyes") AC_SUBST(SDL_CFLAGS) @@ -595,6 +645,9 @@ # Check for graphviz #################### +AC_ARG_WITH([graphviz], AS_HELP_STRING([--without-graphviz], [Build without graphviz librairy (default: test)])) + +if test "x$with_graphviz" != "xno"; then AC_PATH_PROG(GRAPHVIZ, dot, no) if test "$GRAPHVIZ" = "no"; then have_graphviz="no (graphviz not found)" @@ -602,6 +655,7 @@ else have_graphviz="yes" fi +fi AM_CONDITIONAL(HAVE_GRAPHVIZ, test "x$have_graphviz" = "xyes") @@ -609,6 +663,9 @@ # Check for enscript #################### +AC_ARG_WITH([enscript], AS_HELP_STRING([--without-enscript], [Build without enscript (default: test)])) + +if test "x$with_enscript" != "xno"; then AC_PATH_PROG(ENSCRIPT, enscript, no) if test "$ENSCRIPT" = "no"; then have_enscript="no (enscript not found)" @@ -616,6 +673,7 @@ else have_enscript="yes" fi +fi AM_CONDITIONAL(HAVE_ENSCRIPT, test "x$have_enscript" = "xyes") @@ -623,6 +681,10 @@ # Check for asciidoc #################### +AC_ARG_WITH([asciidoc], AS_HELP_STRING([--without-asciidoc], [Build without asciidoc (default: test)])) + + +if test "x$with_asciidoc" != "xno"; then AC_PATH_PROG(ASCIIDOC, asciidoc, no) if test "$ASCIIDOC" = "no"; then have_asciidoc="no (asciidoc not found)" @@ -630,6 +692,7 @@ else have_asciidoc="yes" fi +fi AM_CONDITIONAL(HAVE_ASCIIDOC, test "x$have_asciidoc" = "xyes") @@ -637,14 +700,20 @@ # Check for avcodec and avformat libraries ########################################## +AC_ARG_WITH([ffmpeg], AS_HELP_STRING([--without-ffmpeg], [Build without ffmpeg librairy (default: test)])) + + + if test "x$with_ffmpeg" != "xno"; then PKG_CHECK_MODULES(AVCODEC, libavcodec, have_libavcodec="yes", have_libavcodec="no (usable libavcodec not found)") -AM_CONDITIONAL(HAVE_AVCODEC, test "x$have_libavcodec" = "xyes") PKG_CHECK_MODULES(AVFORMAT, libavformat, have_libavformat="yes", have_libavformat="no (usable libavformat not found)") +fi + +AM_CONDITIONAL(HAVE_AVCODEC, test "x$have_libavcodec" = "xyes") AM_CONDITIONAL(HAVE_AVFORMAT, test "x$have_libavformat" = "xyes") AC_SUBST(AVCODEC_CFLAGS) @@ -679,7 +748,11 @@ # w3m is used to autogenerate README +AC_ARG_WITH([w3m], AS_HELP_STRING([--without-w3m], [Build without w3m (default: test)])) + +if test "x$with_w3m" != "xno"; then AC_PATH_PROG(W3M, w3m, no) +fi AM_CONDITIONAL(HAVE_W3M, test "x$W3M" != "xno") dnl disable build of workshop operations.