Index: configure
===================================================================
--- configure	(revision cb12e46b8b11ffabebe9caea01c5ddc872568759)
+++ configure	(revision 9177e32dc562d9bb1d8c63e77c3d36a70a895d67)
@@ -2161,4 +2161,8 @@
 fi
   
+
+DOC2TEX_EXAMPLE_EXCLUSIONS=""
+
+
 # Check whether --with-tmpdir or --without-tmpdir was given.
 if test "${with_tmpdir+set}" = set; then
@@ -2277,5 +2281,5 @@
 
 echo $ac_n "checking which tmp dir to use""... $ac_c" 1>&6
-echo "configure:2280: checking which tmp dir to use" >&5
+echo "configure:2284: checking which tmp dir to use" >&5
 if test "${with_tmpdir+set}" = set && test -d ${with_tmpdir}; then
   if (echo "${with_tmpdir}" | egrep "\." >/dev/null 2>&1)
@@ -2292,5 +2296,5 @@
 
 echo $ac_n "checking whether to configure and build omalloc""... $ac_c" 1>&6
-echo "configure:2295: checking whether to configure and build omalloc" >&5
+echo "configure:2299: checking whether to configure and build omalloc" >&5
 if test "${enable_omalloc+set}" != set; then
    if test "$ac_cv_omalloc_ok" = yes; then 
@@ -2330,5 +2334,5 @@
 
 echo $ac_n "checking whether to configure and build gmp lib""... $ac_c" 1>&6
-echo "configure:2333: checking whether to configure and build gmp lib" >&5
+echo "configure:2337: checking whether to configure and build gmp lib" >&5
 if test "$enable_gmp" != yes && test "$enable_gmp" != no; then
   if test "$ac_gmp_ok" != yes && test -d gmp; then
@@ -2376,5 +2380,5 @@
 
 echo $ac_n "checking whether to configure and build smallgmp lib""... $ac_c" 1>&6
-echo "configure:2379: checking whether to configure and build smallgmp lib" >&5
+echo "configure:2383: checking whether to configure and build smallgmp lib" >&5
 if test "$enable_smallgmp" != yes && test "$enable_smallgmp" != no; then
   if test "$ac_smallgmp_ok" != yes && test "$ac_gmp_ok" != yes && \
@@ -2417,5 +2421,5 @@
 
 echo $ac_n "checking whether to configure and build MP lib""... $ac_c" 1>&6
-echo "configure:2420: checking whether to configure and build MP lib" >&5
+echo "configure:2424: checking whether to configure and build MP lib" >&5
 if test "$enable_MP" != yes && test "$enable_MP" != no; then
   if test "$with_MP" != no && test "$ac_MP_ok" != yes && test -d MP && \
@@ -2451,5 +2455,5 @@
 
 echo $ac_n "checking whether to configure and build NTL lib""... $ac_c" 1>&6
-echo "configure:2454: checking whether to configure and build NTL lib" >&5
+echo "configure:2458: checking whether to configure and build NTL lib" >&5
 if test "$enable_NTL" != yes && test "$enable_NTL" != no; then
   if test "$with_NTL" != no && test "$ac_NTL_ok" != yes && \
@@ -2476,5 +2480,5 @@
 
 echo $ac_n "checking whether to configure and build factory lib""... $ac_c" 1>&6
-echo "configure:2479: checking whether to configure and build factory lib" >&5
+echo "configure:2483: checking whether to configure and build factory lib" >&5
 if test "$enable_factory" != yes && test "$enable_factory" != no; then
   if test "$with_factory" != no && test "$ac_factory_ok" != yes && \
@@ -2501,5 +2505,5 @@
 
 echo $ac_n "checking whether to configure and build libfac lib""... $ac_c" 1>&6
-echo "configure:2504: checking whether to configure and build libfac lib" >&5
+echo "configure:2508: checking whether to configure and build libfac lib" >&5
 if test "$enable_libfac" != yes && test "$enable_libfac" != no; then
   if test "$with_libfac" != no && test "$ac_libfac_ok" != yes && \
@@ -2531,5 +2535,5 @@
 
 echo $ac_n "checking whether to configure and build sgroup lib""... $ac_c" 1>&6
-echo "configure:2534: checking whether to configure and build sgroup lib" >&5
+echo "configure:2538: checking whether to configure and build sgroup lib" >&5
 if test "$enable_sgroup" = yes; then
   if test ! -d sgroup; then
@@ -2551,5 +2555,5 @@
 
 echo $ac_n "checking whether to configure and build Singular""... $ac_c" 1>&6
-echo "configure:2554: checking whether to configure and build Singular" >&5
+echo "configure:2558: checking whether to configure and build Singular" >&5
 if test "$enable_Singular" != yes && test "$enable_Singular" != no; then
   if test "$with_Singular" != no && test -d Singular; then
@@ -2580,5 +2584,5 @@
 
 echo $ac_n "checking whether to build IntegerProgramming""... $ac_c" 1>&6
-echo "configure:2583: checking whether to build IntegerProgramming" >&5
+echo "configure:2587: checking whether to build IntegerProgramming" >&5
 if test "$enable_IntegerProgramming" != no && test -d "IntegerProgramming"; then
    BUILD_SUBDIRS="$BUILD_SUBDIRS IntegerProgramming"
@@ -2592,5 +2596,5 @@
 
 echo $ac_n "checking whether to build Plural""... $ac_c" 1>&6
-echo "configure:2595: checking whether to build Plural" >&5
+echo "configure:2599: checking whether to build Plural" >&5
 if test "$enable_Plural" != no || test "$with_Plural" != no; then
    echo "$ac_t""yes" 1>&6
@@ -2604,5 +2608,5 @@
 
 echo $ac_n "checking whether to configure and build Texinfo""... $ac_c" 1>&6
-echo "configure:2607: checking whether to configure and build Texinfo" >&5
+echo "configure:2611: checking whether to configure and build Texinfo" >&5
 if test "$enable_Texinfo" != no && test -d Texinfo; then
   echo "$ac_t""yes" 1>&6
@@ -2628,5 +2632,5 @@
 set dummy makeinfo; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2631: checking for $ac_word" >&5
+echo "configure:2635: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2658,5 +2662,5 @@
 set dummy texi2dvi; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2661: checking for $ac_word" >&5
+echo "configure:2665: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_TEXI2DVI'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2688,5 +2692,5 @@
 set dummy texindex; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2691: checking for $ac_word" >&5
+echo "configure:2695: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_TEXINDEX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2718,5 +2722,5 @@
 set dummy texi2pdf; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2721: checking for $ac_word" >&5
+echo "configure:2725: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_TEXI2PDF'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2748,5 +2752,5 @@
 
 echo $ac_n "checking whether to configure and build Texi2html""... $ac_c" 1>&6
-echo "configure:2751: checking whether to configure and build Texi2html" >&5
+echo "configure:2755: checking whether to configure and build Texi2html" >&5
 if test "$enable_Texi2html" != no && test -d Texi2html; then
  echo "$ac_t""yes" 1>&6
@@ -2763,5 +2767,5 @@
 set dummy texi2html; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2766: checking for $ac_word" >&5
+echo "configure:2770: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_TEXI2HTML'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2801,5 +2805,5 @@
 
 echo $ac_n "checking whether to build doc""... $ac_c" 1>&6
-echo "configure:2804: checking whether to build doc" >&5
+echo "configure:2808: checking whether to build doc" >&5
 if test "$enable_doc" != no && test -d doc; then
  echo "$ac_t""yes" 1>&6
@@ -2815,5 +2819,5 @@
 
 echo $ac_n "checking whether to build emacs""... $ac_c" 1>&6
-echo "configure:2818: checking whether to build emacs" >&5
+echo "configure:2822: checking whether to build emacs" >&5
 if test "$enable_doc" = yes && test "$enable_emacs" != no && test -d emacs; then
  echo "$ac_t""yes" 1>&6
@@ -2827,5 +2831,5 @@
 
 echo $ac_n "checking which apint package to use""... $ac_c" 1>&6
-echo "configure:2830: checking which apint package to use" >&5
+echo "configure:2834: checking which apint package to use" >&5
 if test "$with_apint" = gmp; then
   if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
@@ -2851,5 +2855,5 @@
 
 echo $ac_n "checking whether to use with MP""... $ac_c" 1>&6
-echo "configure:2854: checking whether to use with MP" >&5
+echo "configure:2858: checking whether to use with MP" >&5
 if test "$with_MP" = yes; then
   if test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then
@@ -2867,8 +2871,9 @@
   echo "$ac_t""no" 1>&6
   ac_configure_args="$ac_configure_args --without-MP"
+  DOC2TEX_EXAMPLE_EXCLUSIONS="$DOC2TEX_EXAMPLE_EXCLUSIONS -exclude MP"
 fi
 
 echo $ac_n "checking whether to use with factory""... $ac_c" 1>&6
-echo "configure:2873: checking whether to use with factory" >&5
+echo "configure:2878: checking whether to use with factory" >&5
 if test "$with_factory" = yes; then
   if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then
@@ -2889,5 +2894,5 @@
   
 echo $ac_n "checking whether to use with libfac""... $ac_c" 1>&6
-echo "configure:2892: checking whether to use with libfac" >&5
+echo "configure:2897: checking whether to use with libfac" >&5
 if test "$with_libfac" = yes; then
   if test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes; then
@@ -2910,5 +2915,5 @@
 
 echo $ac_n "checking whether to use with Singular""... $ac_c" 1>&6
-echo "configure:2913: checking whether to use with Singular" >&5
+echo "configure:2918: checking whether to use with Singular" >&5
 if test "$with_Singular" != no && test "$with_Singular" != yes; then
   if test "$enable_Singular" = yes; then
@@ -2976,5 +2981,5 @@
   
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2979: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:2984: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
@@ -3175,4 +3180,5 @@
 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
 s%@SINGULAR@%$SINGULAR%g
+s%@DOC2TEX_EXAMPLE_EXCLUSIONS@%$DOC2TEX_EXAMPLE_EXCLUSIONS%g
 s%@TMP_DIR@%$TMP_DIR%g
 s%@TEXI2DVI@%$TEXI2DVI%g
Index: configure.in
===================================================================
--- configure.in	(revision cb12e46b8b11ffabebe9caea01c5ddc872568759)
+++ configure.in	(revision 9177e32dc562d9bb1d8c63e77c3d36a70a895d67)
@@ -242,4 +242,8 @@
 dnl Check command line arguments
 dnl
+
+DOC2TEX_EXAMPLE_EXCLUSIONS=""
+AC_SUBST(DOC2TEX_EXAMPLE_EXCLUSIONS)
+
 AC_ARG_WITH(tmpdir, \
  [ --with-tmpdir=DIR       use DIR as temporary directory])
@@ -746,4 +750,5 @@
   AC_MSG_RESULT(no)
   ac_configure_args="$ac_configure_args --without-MP"
+  DOC2TEX_EXAMPLE_EXCLUSIONS="$DOC2TEX_EXAMPLE_EXCLUSIONS -exclude MP"
 fi
 
Index: doc/doc2tex.pl
===================================================================
--- doc/doc2tex.pl	(revision cb12e46b8b11ffabebe9caea01c5ddc872568759)
+++ doc/doc2tex.pl	(revision 9177e32dc562d9bb1d8c63e77c3d36a70a895d67)
@@ -1,4 +1,4 @@
 #!/usr/local/bin/perl
-# $Id: doc2tex.pl,v 1.27 2003-04-25 13:23:46 levandov Exp $
+# $Id: doc2tex.pl,v 1.28 2005-07-04 14:50:16 Singular Exp $
 ###################################################################
 #  Computer Algebra System SINGULAR
@@ -65,4 +65,5 @@
 $reuse = 1;
 $no_ex = 0;
+%exclude_ex = ();
 $no_fun = 0;
 $doc_subdir = "./d2t_singular";
@@ -115,4 +116,5 @@
   if (/^-c(lean)?$/)     { $clean = 1; next;}
   if (/^-no_e(x)?$/)     { $no_ex = 1; next;}
+  if (/^-exclude$/)      { $exclude_ex{shift(@ARGV)} = 1;next;}
   if (/^-no_fu(n)?$/)    { $no_fun = 1;next;}
   if (/^-m(ake)?$/)      { $make =  shift(@ARGV);next;}
@@ -262,5 +264,5 @@
 {
   my($inc_file, $ex_file, $lline, $thisexample, $error_ok, $cache, $no_comp,
-     $unix_only);
+     $unix_only, $tag);
   
   $lline = $line;
@@ -270,5 +272,14 @@
   $examples{$section}++;
 
-  if ($no_ex)
+  if (/tag:(\w+)/)
+  {
+    $tag = $1;
+  }
+  else
+  {
+    $tag = 'NOTAG';
+  }
+  
+  if ($no_ex or $exclude_ex{$tag})
   {
     print "{$ex_prefix}" if ($verbose);
@@ -301,5 +312,5 @@
     last if (/^\@c\s*example\s*$/);
 #    s/^\s*//; # remove preceeding white spaces
-    if ($no_ex || $no_comp || $unix_only)
+    if ($no_ex || $exclude_ex{$tag} || $no_comp || $unix_only)
     {
       &protect_texi;
@@ -321,5 +332,5 @@
 
   # done, if no examples
-  return if ($no_ex || $no_comp || $unix_only);
+  return if ($no_ex || $exclude_ex{$tag} || $no_comp || $unix_only);
 
   # check whether it can be reused
Index: ntl/configure
===================================================================
--- ntl/configure	(revision cb12e46b8b11ffabebe9caea01c5ddc872568759)
+++ ntl/configure	(revision 9177e32dc562d9bb1d8c63e77c3d36a70a895d67)
@@ -1,11 +1,33 @@
 #!/bin/sh
-# version $Id: configure,v 1.20 2005-05-02 14:08:07 Singular Exp $
-for i in $*
-do
-  case $i in
-  --prefix=*) prefix=`echo $i|sed 's/--prefix=//'` ;;
-  --libdir=*) libdir=`echo $i|sed 's/--libdir=//'` ;;
-  --includedir=*) includedir=`echo $i|sed 's/--includedir=//'` ;;
-  esac
+# version $Id: configure,v 1.21 2005-07-04 14:50:17 Singular Exp $
+
+while [ $# -ne 0 ]; do
+   case $1 in 
+     --prefix=*)
+         prefix=`echo $1 | sed 's/--prefix=//'` ;
+         ;;
+     --prefix)
+         shift;
+         prefix="$1";
+         ;;
+     --libdir=*)
+         libdir=`echo $1 | sed 's/--libdir=//'` ;
+         ;;
+     --libdir)
+         shift;
+         libdir="$1";
+         ;;
+     --includedir=*)
+         includedir=`echo $1 | sed 's/--includedir=//'` ;
+         ;;
+     --includedir)
+         shift;
+         includedir="$1";
+         ;;
+     *)
+         echo "Unknown option: $1";
+         ;;
+  esac;
+  shift;
 done
 
