Commits

Jian Zhou committed f71e6be

Added SVM multiclass

Comments (0)

Files changed (4)

 # Gengetopt is required to update cmdline.c and cmdline.h (in tools) if out of date.
 #! CFLAGS assumes headers in same directory as binaries for installed
 AC_ARG_WITH([gengetopt],
-	[AS_HELP_STRING([--with-gengetopt=PATH], [prefix of gengetopt installation])],
-	[
-	  if test "x$with_gengetopt" = "xyes"; then
-	    with_gengetopt=check
-	  elif test "x$with_gengetopt" = "xno"; then
-	    with_gengetopt = no
+        [AS_HELP_STRING([--with-gengetopt=PATH], [prefix of gengetopt installation])],
+        [
+          if test "x$with_gengetopt" = "xyes"; then
+            with_gengetopt=check
+          elif test "x$with_gengetopt" = "xno"; then
+            with_gengetopt = no
           else
-	    qualify_path with_gengetopt
-	  fi
-	],
-	[with_gengetopt=check])
+            qualify_path with_gengetopt
+          fi
+        ],
+        [with_gengetopt=check])
 LOCAL_PATH_PROG([gengetopt], [gengetopt],
         [GENGETOPT_PREFIX=$prog_gengetopt_prefix
          GENGETOPT_INCLUDES="-I${GENGETOPT_PREFIX}/include"],  dnl found
         [],                                                    dnl found installed
-	[],                                                    dnl found in with path
-	[],                                                    dnl not found
+        [],                                                    dnl found in with path
+        [],                                                    dnl not found
         [])                                                    dnl requested without
 ## set CFLAGS and LIBS
 if test "x$GENGETOPT_PREFIX" != "x"; then
 # If not specified, check for it.
 # If no readline, do not build OntoShell.
 AC_ARG_WITH([readline],
-	[AS_HELP_STRING([--with-readline=PATH], [prefix of readline installation])],
-	[
+        [AS_HELP_STRING([--with-readline=PATH], [prefix of readline installation])],
+        [
          if test "x$with_readline" = "xyes"; then
-	   readline_state=check
+           readline_state=check
          elif test "x$with_readline" != "xno"; then
            readline_state=try
-	   qualify_path with_readline
+           qualify_path with_readline
            LOCAL_CHECK_APPEND_PATHS([$with_readline], [. include], [readline/readline.h], [READLINE_INCLUDE_DIR], [readline_state=warn])
            LOCAL_CHECK_APPEND_PATHS([$with_readline], [. lib], [libreadline.a], [READLINE_LIB_DIR], [readline_state=warn])
          else
            readline_state=no
          fi
         ],
-	[readline_state=check])
+        [readline_state=check])
 AC_LANG_PUSH([C])
 LOCAL_CHECK_LIB([readline], [readline], [readline("foo")],
-	[readline_state=ok],                                       dnl found
-	[READLINE_LIBS="-lreadline -lncurses"],                    dnl and found installed
-	[
-	  READLINE_CFLAGS="-I $READLINE_INCLUDE_DIR"
-	  READLINE_LIBS="-L $READLINE_LIB_DIR -lreadline -lncurses"
-	],                                                         dnl and found in specified path
-	[],                                                        dnl not found
+        [readline_state=ok],                                       dnl found
+        [READLINE_LIBS="-lreadline -lncurses"],                    dnl and found installed
+        [
+          READLINE_CFLAGS="-I $READLINE_INCLUDE_DIR"
+          READLINE_LIBS="-L $READLINE_LIB_DIR -lreadline -lncurses"
+        ],                                                         dnl and found in specified path
+        [],                                                        dnl not found
         [readline_state=no],                                       dnl and not found installed
         [readline_state=warn],                                     dnl and not found in specified path
-	[],                                                        dnl requested without
-	[#include <stdio.h>
-	 #include "readline/readline.h"],	
-	[-lncurses],
-	[-L $READLINE_LIB_DIR -I $READLINE_INCLUDE_DIR])
+        [],                                                        dnl requested without
+        [#include <stdio.h>
+         #include "readline/readline.h"],
+        [-lncurses],
+        [-L $READLINE_LIB_DIR -I $READLINE_INCLUDE_DIR])
 AC_LANG_POP
 if test "x$readline_state" != "xok"; then
   AC_DEFINE([NO_READLINE], [1])
 #  # hopefully this is an unusual exception
 #  AC_LINK_IFELSE(
 #    [AC_LANG_PROGRAM([#include <stdio.h>
-#		      #include "readline/readline.h"],
-#		      [rl_completion_matches])],
+#                     #include "readline/readline.h"],
+#                     [rl_completion_matches])],
 #    [],
 #    [AC_DEFINE([rl_completion_matches], [completion_matches])])
 #AC_SUBST(READLINE_PREFIX)
 # If not specified, check for it.
 # If no readline, do not build OntoShell.
 AC_ARG_WITH([pthread],
-	[AS_HELP_STRING([--with-pthread=PATH], [prefix of pthread installation])],
-	[
+        [AS_HELP_STRING([--with-pthread=PATH], [prefix of pthread installation])],
+        [
          if test "x$with_pthread" = "xyes"; then
-	   pthread_state=check
+           pthread_state=check
          elif test "x$with_pthread" != "xno"; then
            pthread_state=try
-	   qualify_path with_pthread
+           qualify_path with_pthread
            LOCAL_CHECK_APPEND_PATHS([$with_pthread], [. include], [pthread.h], [PTHREAD_INCLUDE_DIR], [pthread_state=warn])
            LOCAL_CHECK_APPEND_PATHS([$with_pthread], [. lib], [libpthread.a], [PTHREAD_LIB_DIR], [pthread_state=warn])
          else
            pthread_state=no
          fi
         ],
-	[pthread_state=check])
+        [pthread_state=check])
 AC_LANG_PUSH([C])
 LOCAL_CHECK_LIB([pthread], [pthread], [pthread_create],
-	[pthread_state=ok],                                        dnl found
-	[PTHREAD_LIBS="-lpthread"],                                dnl and found installed
-	[
-	  PTHREAD_CFLAGS="-I $PTHREAD_INCLUDE_DIR"
-	  PTHREAD_LIBS="-L $PTHREAD_LIB_DIR -lpthread"
-	],                                                         dnl and found in specified path
-	[],                                                        dnl not found
+        [pthread_state=ok],                                        dnl found
+        [PTHREAD_LIBS="-lpthread"],                                dnl and found installed
+        [
+          PTHREAD_CFLAGS="-I $PTHREAD_INCLUDE_DIR"
+          PTHREAD_LIBS="-L $PTHREAD_LIB_DIR -lpthread"
+        ],                                                         dnl and found in specified path
+        [],                                                        dnl not found
         [pthread_state=no],                                        dnl and not found installed
         [pthread_state=warn],                                      dnl and not found in specified path
-	[],                                                        dnl requested without
-	[#include <stdio.h>
-	 #include "pthread.h"],	
-	[],
-	[-L $PTHREAD_LIB_DIR -I $PTHREAD_INCLUDE_DIR])
+        [],                                                        dnl requested without
+        [#include <stdio.h>
+         #include "pthread.h"],
+        [],
+        [-L $PTHREAD_LIB_DIR -I $PTHREAD_INCLUDE_DIR])
 AC_LANG_POP
 if test "x$pthread_state" != "xok"; then
   AC_DEFINE([NO_PTHREAD], [1])
   log4cpp_state=no
 else
 AC_ARG_WITH([log4cpp],
-	[AS_HELP_STRING([--with-log4cpp=PATH], [prefix of log4cpp installation or build directory])],
-	[
+        [AS_HELP_STRING([--with-log4cpp=PATH], [prefix of log4cpp installation or build directory])],
+        [
          if test "x$with_log4cpp" = "xyes"; then
            log4cpp_state=check
          elif test "x$with_log4cpp" != "xno"; then
            log4cpp_state=try
-	   qualify_path with_log4cpp
+           qualify_path with_log4cpp
            LOCAL_CHECK_APPEND_PATHS([$with_log4cpp], [. include], [log4cpp/Category.hh], [LOG4CPP_INCLUDE_DIR], [log4cpp_state=warn])
            LOCAL_CHECK_APPEND_PATHS([$with_log4cpp], [. lib src/.libs], [liblog4cpp.a], [LOG4CPP_LIB_DIR], [log4cpp_state=warn])
          else
            log4cpp_state=no
          fi
         ],
-	[log4cpp_state=check])
+        [log4cpp_state=check])
 LOCAL_CHECK_LIB([log4cpp], [log4cpp], [log4cpp::Category::getInstance("foo")],
         [log4cpp_state=ok],                                       dnl found
         [LOG4CPP_LIBS="-llog4cpp"],                               dnl and found installed
          LOG4CPP_CFLAGS="-I $LOG4CPP_INCLUDE_DIR"
          LOG4CPP_LIBS="-L $LOG4CPP_LIB_DIR -llog4cpp"
         ],                                                        dnl and found in specified path
-	[],                                                       dnl not found
+        [],                                                       dnl not found
         [log4cpp_state=no],                                       dnl and not found installed
         [log4cpp_state=warn],                                     dnl and not found in specified path
         [],                                                       dnl requested without
-	[#include "log4cpp/Category.hh"],
+        [#include "log4cpp/Category.hh"],
         [-lpthread],
         [-L $LOG4CPP_LIB_DIR -I $LOG4CPP_INCLUDE_DIR])
 fi
 USE_OPENMP=true
 sleipnir_cv_openmp=yes
 AC_ARG_ENABLE(openmp,
-	[AS_HELP_STRING([--disable-openmp],
-	[disable OpenMP SMP multi-threading])],
-	[if test "$enableval" = no; then sleipnir_cv_openmp=no; USE_OPENMP=false; fi], [])
+        [AS_HELP_STRING([--disable-openmp],
+        [disable OpenMP SMP multi-threading])],
+        [if test "$enableval" = no; then sleipnir_cv_openmp=no; USE_OPENMP=false; fi], [])
 if $USE_OPENMP; then
-	dnl case "$canonical_host_type" in
-	dnl	*-*-mingw* | *-*-cygwin* | *-*-gnu*)
-		AC_MSG_CHECKING([for support of OpenMP])
-		XCFLAGS="$CFLAGS"
-		CFLAGS="$CFLAGS -fopenmp"
-		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-			#include <omp.h>
-			#include <stdio.h>
-		]], [[
-			  _Pragma("omp parallel")  
-			  printf("Hello, world.\n");
-			  return 0;
-			]])],sleipnir_cv_openmp=yes, sleipnir_cv_openmp=no)
-		dnl AC_MSG_FAILURE([Error has occurred])
-		AC_MSG_RESULT([$sleipnir_cv_openmp])
-			if test "$sleipnir_cv_openmp" = yes; then
-			  AC_DEFINE(HAVE_OPENMP,1,[Define if compiler supports OpenMP])
-			  CXXFLAGS="$CXXFLAGS -fopenmp"
-			  USE_OPENMP=true
-			else
-			  CFLAGS="$XCFLAGS"
-			  USE_OPENMP=false
-			fi
-			dnl SLEIPNIR_CHECK_OPENMP(-fopenmp)
-	dnl	;;
-	dnl	*-*-msdosmsvc)
-	dnl	## FIXME is this the right flag for MSVC?
-	dnl	SLEIPNIR_CHECK_OPENMP(-openmp)
-	dnl	;;
-	dnl	## Add other compilers supporting OpenMP here
-	dnl #esac
+        dnl case "$canonical_host_type" in
+        dnl	*-*-mingw* | *-*-cygwin* | *-*-gnu*)
+                AC_MSG_CHECKING([for support of OpenMP])
+                XCFLAGS="$CFLAGS"
+                CFLAGS="$CFLAGS -fopenmp"
+                AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+                        #include <omp.h>
+                        #include <stdio.h>
+                ]], [[
+                          _Pragma("omp parallel")
+                          printf("Hello, world.\n");
+                          return 0;
+                        ]])],sleipnir_cv_openmp=yes, sleipnir_cv_openmp=no)
+                dnl AC_MSG_FAILURE([Error has occurred])
+                AC_MSG_RESULT([$sleipnir_cv_openmp])
+                        if test "$sleipnir_cv_openmp" = yes; then
+                          AC_DEFINE(HAVE_OPENMP,1,[Define if compiler supports OpenMP])
+                          CXXFLAGS="$CXXFLAGS -fopenmp"
+                          USE_OPENMP=true
+                        else
+                          CFLAGS="$XCFLAGS"
+                          USE_OPENMP=false
+                        fi
+                        dnl SLEIPNIR_CHECK_OPENMP(-fopenmp)
+        dnl	;;
+        dnl	*-*-msdosmsvc)
+        dnl	## FIXME is this the right flag for MSVC?
+        dnl	SLEIPNIR_CHECK_OPENMP(-openmp)
+        dnl	;;
+        dnl	## Add other compilers supporting OpenMP here
+        dnl #esac
 fi
 
 #
 # Also check for libsmilexml.a and define SMILEXML_LIB if found (not used?)
 # If none, set NO_SMILE=1.
 AC_ARG_WITH([smile],
-	[AS_HELP_STRING([--with-smile=PATH], [prefix of SMILE installation])],
-	[
+        [AS_HELP_STRING([--with-smile=PATH], [prefix of SMILE installation])],
+        [
         if test "x$with_smile" = "xyes"; then
             smile_state=check
         elif test "x$with_smile" != "xno"; then
             smile_state=try
-	        qualify_path with_smile
+                qualify_path with_smile
             LOCAL_CHECK_APPEND_PATHS([$with_smile], [. include smile include/smile], [smile.h], [SMILE_INCLUDE_DIR], [smile_state=warn])
             LOCAL_CHECK_APPEND_PATHS([$with_smile], [. lib smile], [libsmile.a], [SMILE_LIB_DIR], [smile_state=warn])
         else
             smile_state=no
         fi
     ],
-	[smile_state=check])
-	LOCAL_CHECK_LIB([smile], [smile], [DSL_isFinite(1.0)],
-	
+        [smile_state=check])
+        LOCAL_CHECK_LIB([smile], [smile], [DSL_isFinite(1.0)],
+
     [smile_state=ok],                                         dnl found
     [
-	    SMILE_LIBS="-lsmile"
+            SMILE_LIBS="-lsmile"
         #SMILEXML_LIB
-	],                                                       dnl and found installed
+        ],                                                       dnl and found installed
         [
 #    if test -f "$SMILE_LIB_DIR/libsmilexml.a"; then
 #      AC_DEFINE([SMILEXML_LIB], [1])
 #         SMILE_LIBS="-L $SMILE_LIB_DIR $SMILEXML_LIB -lsmile"
          SMILE_LIBS="-L $SMILE_LIB_DIR -lsmile"
         ],                                                        dnl and found in specified path
-	[],                                                       dnl not found
+        [],                                                       dnl not found
     [smile_state=no],                                         dnl and not found installed
     [smile_state=warn],                                       dnl and not found in specified path
     [],                                                       dnl requested without
-	[#include "smile.h"],
+        [#include "smile.h"],
     [],
     [-L $SMILE_LIB_DIR -I $SMILE_INCLUDE_DIR])
 if test "x$smile_state" != "xok"; then
          elif test "x$with_libsvm" != "xno"; then
            libsvm_state=try
            qualify_path with_libsvm
-	   LOCAL_CHECK_APPEND_PATHS([$with_libsvm], [. include], [libsvm/svm.h], [LIBSVM_INCLUDE_DIR], [libsvm_state=warn])
+           LOCAL_CHECK_APPEND_PATHS([$with_libsvm], [. include], [libsvm/svm.h], [LIBSVM_INCLUDE_DIR], [libsvm_state=warn])
            LOCAL_CHECK_APPEND_PATHS([$with_libsvm], [. lib], [liblibsvm.a], [LIBSVM_LIB_DIR], [libsvm_state=warn])
          else
            libsvm_state=no
         [libsvm_state=warn],                                    dnl and not found in specified path
         [],                                                       dnl requested without
         [
-	 #include <sys/types.h>
+         #include <sys/types.h>
          #include "libsvm/svm.h"],
         [],
         [-L $LIBSVM_LIB_DIR -I $LIBSVM_INCLUDE_DIR])
 ## LOCAL_CHECK_LIB(1 lib name, 2 local name, 3 function,
-##   4 action if found, 
-##   5 extra action if found installed, 
+##   4 action if found,
+##   5 extra action if found installed,
 ##   6 extra action if found in 'with' path,
-##   7 action if not found, 
-##   8 action if not found installed, 
+##   7 action if not found,
+##   8 action if not found installed,
 ##   9 action if not found installed in 'with' path,
 ##   10 action if requested without,
 ##   11 headers, 12 extra libs
 # While checking, look for a source distribution in extlib/.
 # If none, set NO_SVM_PERF=1.
 AC_ARG_WITH([svm_perf],
-	[AS_HELP_STRING([--with-svm-perf=PATH], [prefix of SVM Perf installation])],
-	[
+        [AS_HELP_STRING([--with-svm-perf=PATH], [prefix of SVM Perf installation])],
+        [
          if test "x$with_svm_perf" = "xyes"; then
-	   svm_perf_state=check
+           svm_perf_state=check
          elif test "x$with_svm_perf" != "xno"; then
            svm_perf_state=try
-	   qualify_path with_svm_perf
+           qualify_path with_svm_perf
            LOCAL_CHECK_APPEND_PATHS([$with_svm_perf], [. include], [svm_struct_api.h], [SVM_PERF_INCLUDE_DIR], [svm_perf_state=warn])
            LOCAL_CHECK_APPEND_PATHS([$with_svm_perf], [. lib], [libsvmperf.a], [SVM_PERF_LIB_DIR], [svm_perf_state=warn])
          else
            svm_perf_state=no
          fi
         ],
-	[svm_perf_state=check])
+        [svm_perf_state=check])
 AC_LANG_PUSH([C])
 LOCAL_CHECK_LIB([svmperf], [svm_perf], [optimize_svm],
         [svm_perf_state=ok],                                      dnl found
          SVM_PERF_CFLAGS="-I $SVM_PERF_INCLUDE_DIR"
          SVM_PERF_LIBS="-L $SVM_PERF_LIB_DIR -lsvmperf"
         ],                                                        dnl and found in specified path
-	[],                                                       dnl not found
+        [],                                                       dnl not found
         [svm_perf_state=no],                                      dnl and not found installed
         [svm_perf_state=warn],                                    dnl and not found in specified path
         [],                                                       dnl requested without
-	[#include <sys/types.h>
-	 #include "svm_light/svm_common.h",
-	 #include "svm_light/svm_learn.h"],
+        [#include <sys/types.h>
+         #include "svm_light/svm_common.h",
+         #include "svm_light/svm_learn.h"],
         [],
         [-L $SVM_PERF_LIB_DIR -I $SVM_PERF_INCLUDE_DIR])
 AC_LANG_POP
 #AC_SUBST(SVM_PERF_PREFIX)
 AC_SUBST(SVM_PERF_CFLAGS)
 AC_SUBST(SVM_PERF_LIBS)
-#	 #include "svm/svm_struct_api.h"
-#	 #include "svm/svm_struct_api_types.h"],
+#        #include "svm/svm_struct_api.h"
+#        #include "svm/svm_struct_api_types.h"],
+
+## SVM MULTICLASS
+# If the user specifies a path, use it.
+# If the user says not to use it, then don't.
+# If the user doesn't specify anything, check for it.
+# While checking, look for a source distribution in extlib/.
+# If none, set NO_SVM_MULTICLASS=1.
+AC_ARG_WITH([svm_multiclass],
+  [AS_HELP_STRING([--with-svm-multiclass=PATH], [prefix of SVM Multiclass installation])],
+  [
+         if test "x$with_svm_multiclass" = "xyes"; then
+     svm_multiclass_state=check
+         elif test "x$with_svm_multiclass" != "xno"; then
+           svm_multiclass_state=try
+     qualify_path with_svm_multiclass
+           LOCAL_CHECK_APPEND_PATHS([$with_svm_multiclass], [. include], [svm_multiclass/svm_struct_api.h], [SVM_MULTICLASS_INCLUDE_DIR], [svm_multiclass_state=warn])
+           LOCAL_CHECK_APPEND_PATHS([$with_svm_multiclass], [. lib], [svm_multiclass/libsvmmulticlass.a], [SVM_MULTICLASS_LIB_DIR], [svm_multiclass_state=warn])
+         else
+           svm_multiclass_state=no
+         fi
+        ],
+  [svm_multiclass_state=check])
+AC_LANG_PUSH([C])
+LOCAL_CHECK_LIB([svmmulticlass], [svm_multiclass], [optimize_svm],
+        [svm_multiclass_state=ok],                                      dnl found
+        [SVM_MULTICLASS_LIBS="-lsvmmulticlass"],                              dnl and found installed
+        [
+         SVM_MULTICLASS_CFLAGS="-I $SVM_MULTICLASS_INCLUDE_DIR"
+         SVM_MULTICLASS_LIBS="-L $SVM_MULTICLASS_LIB_DIR/svm_multiclass -lsvmmulticlass"
+        ],                                                        dnl and found in specified path
+  [],                                                       dnl not found
+        [svm_multiclass_state=no],                                      dnl and not found installed
+        [svm_multiclass_state=warn],                                    dnl and not found in specified path
+        [],                                                       dnl requested without
+  [#include <sys/types.h>
+   #include "svm_light/svm_common.h",
+   #include "svm_light/svm_learn.h"],
+        [],
+        [-L $SVM_MULTICLASS_LIB_DIR/svm_multiclass -I $SVM_MULTICLASS_INCLUDE_DIR/svm_multiclass])
+AC_LANG_POP
+if test "x$svm_multiclass_state" != "xok"; then
+  AC_DEFINE([NO_SVM_MULTICLASS], [1])
+fi
+#AC_SUBST(SVM_MULTICLASS_PREFIX)
+AC_SUBST(SVM_MULTICLASS_CFLAGS)
+AC_SUBST(SVM_MULTICLASS_LIBS)
+#  #include "svm/svm_struct_api.h"
+#  #include "svm/svm_struct_api_types.h"],
+
 
 
 ## BOOST
 # If not specified, check for it.
 # BOOST graph lib is required for BNServer.
 AC_ARG_WITH([boost],
-	[AS_HELP_STRING([--with-boost=PATH], [prefix of Boost installation])],
-	[ 
+        [AS_HELP_STRING([--with-boost=PATH], [prefix of Boost installation])],
+        [
          if test "x$with_boost" = "xyes"; then
-	   boost_state=check
+           boost_state=check
          elif test "x$with_boost" != "xno"; then
            boost_state=try
-	   qualify_path with_boost
+           qualify_path with_boost
            LOCAL_CHECK_APPEND_PATHS([$with_boost], [. .. include], [boost/graph/graphviz.hpp], [BOOST_INCLUDE_DIR], [boost_state=warn])
            LOCAL_CHECK_APPEND_PATHS([$with_boost], [. lib stage/lib], [libboost_graph.a], [BOOST_GRAPH_LIB_DIR], [boost_state=warn])
            LOCAL_CHECK_APPEND_PATHS([$with_boost], [. lib stage/lib], [libboost_regex.a], [BOOST_REGEX_LIB_DIR], [boost_state=warn])
            if test "x$BOOST_GRAPH_LIB_DIR" != "x$BOOST_REGEX_LIB_DIR"; then
-	     boost_state=warn
- 	   else
-	     BOOST_LIB_DIR=$BOOST_GRAPH_LIB_DIR
-	   fi
+             boost_state=warn
+           else
+             BOOST_LIB_DIR=$BOOST_GRAPH_LIB_DIR
+           fi
          else
            boost_state=no
          fi
         ],
-	[boost_state=check])
+        [boost_state=check])
 LOCAL_CHECK_LIB([boost_graph], [boost], [],
         [boost_state=ok],                                         dnl found
         [],                                                       dnl and found installed
         [],                                                       dnl and found in specified path
-	[],                                                       dnl not found
+        [],                                                       dnl not found
         [boost_state=no],                                         dnl and not found installed
         [boost_state=warn],                                       dnl and not found in specified path
         [],                                                       dnl requested without
-	[#include "boost/graph/graphviz.hpp"],
+        [#include "boost/graph/graphviz.hpp"],
         [],
         [-L $BOOST_LIB_DIR -I $BOOST_INCLUDE_DIR])
 if test "x$boost_state" = "xok"; then
          BOOST_CFLAGS="-I $BOOST_INCLUDE_DIR"
          BOOST_LIBS="-L $BOOST_LIB_DIR -lboost_graph -lboost_regex"
         ],                                                        dnl and found in specified path
-	[],                                                       dnl not found
+        [],                                                       dnl not found
         [boost_state=no],                                         dnl and not found installed
         [boost_state=warn],                                       dnl and not found in specified path
         [],                                                       dnl requested without
-	[#include "boost/graph/graphviz.hpp"],
+        [#include "boost/graph/graphviz.hpp"],
         [],
         [-L $BOOST_LIB_DIR -I $BOOST_INCLUDE_DIR])
 fi
 ## GSL library
 
 AC_ARG_WITH([gsl],
-	[AS_HELP_STRING([--with-gsl=PATH], [prefix of GSL installation or build dir])],
-	[ 
+        [AS_HELP_STRING([--with-gsl=PATH], [prefix of GSL installation or build dir])],
+        [
          if test "x$with_gsl" = "xyes"; then
-	   		gsl_state=check
+                        gsl_state=check
          elif test "x$with_gsl" != "xno"; then
-           	gsl_state=try
-	   qualify_path with_gsl
+                gsl_state=try
+           qualify_path with_gsl
            LOCAL_CHECK_APPEND_PATHS([$with_gsl], [. include], [gsl/gsl_blas.h], [GSL_INCLUDE_DIR], [gsl_state=warn])
            LOCAL_CHECK_APPEND_PATHS([$with_gsl], [. lib], [libgsl.a], [GSL_LIB_DIR], [gsl_state=warn])
          else
            gsl_state=no
          fi
         ],
-	[gsl_state=check])
+        [gsl_state=check])
 LOCAL_CHECK_LIB([gsl], [gsl], [gsl_rng_env_setup()],
         [gsl_state=ok],                                 dnl found
         [GSL_LIBS="-lgsl -lgslcblas"],                              dnl and found installed
          GSL_CFLAGS="-I $GSL_INCLUDE_DIR"
          GSL_LIBS="-L $GSL_LIB_DIR -lgsl -lgslcblas"
         ],                                                        dnl and found in specified path
-	[],                                                       dnl not found
+        [],                                                       dnl not found
         [gsl_state=no],                                 dnl and not found installed
         [gsl_state=warn],                               dnl and not found in specified path
         [],                                                       dnl requested without
-	[#include <stdio.h>
-	 #include <gsl/gsl_rng.h>],
+        [#include <stdio.h>
+         #include <gsl/gsl_rng.h>],
         [-lgsl -lgslcblas],
         [-L $GSL_LIB_DIR -I $GSL_INCLUDE_DIR])
 if test "x$gsl_state" != "xok"; then
   vowpal_wabbit_state=no
 else
 AC_ARG_WITH([vowpal_wabbit],
-	[AS_HELP_STRING([--with-vowpal-wabbit=PATH], [prefix of Vowpal Wabbit installation or build dir])],
-	[ 
+        [AS_HELP_STRING([--with-vowpal-wabbit=PATH], [prefix of Vowpal Wabbit installation or build dir])],
+        [
          if test "x$with_vowpal_wabbit" = "xyes"; then
-	   vowpal_wabbit_state=check
+           vowpal_wabbit_state=check
          elif test "x$with_vowpal_wabbit" != "xno"; then
            vowpal_wabbit_state=try
-	   qualify_path with_vowpal_wabbit
+           qualify_path with_vowpal_wabbit
            LOCAL_CHECK_APPEND_PATHS([$with_vowpal_wabbit], [. include], [vw.h], [VOWPAL_WABBIT_INCLUDE_DIR], [vowpal_wabbit_state=warn])
            LOCAL_CHECK_APPEND_PATHS([$with_vowpal_wabbit], [. lib], [libvw.a], [VOWPAL_WABBIT_LIB_DIR], [vowpal_wabbit_state=warn])
          else
            vowpal_wabbit_state=no
          fi
         ],
-	[vowpal_wabbit_state=check])
+        [vowpal_wabbit_state=check])
 LOCAL_CHECK_LIB([vw], [vowpal_wabbit], [start_noop()],
         [vowpal_wabbit_state=ok],                                 dnl found
         [VOWPAL_WABBIT_LIBS="-lvw"],                              dnl and found installed
          VOWPAL_WABBIT_CFLAGS="-I $VOWPAL_WABBIT_INCLUDE_DIR"
          VOWPAL_WABBIT_LIBS="-L $VOWPAL_WABBIT_LIB_DIR -lvw"
         ],                                                        dnl and found in specified path
-	[],                                                       dnl not found
+        [],                                                       dnl not found
         [vowpal_wabbit_state=no],                                 dnl and not found installed
         [vowpal_wabbit_state=warn],                               dnl and not found in specified path
         [],                                                       dnl requested without
-	[#include "boost/program_options.hpp"
-	 #include "zlib.h"
-	 #include "noop.h"],
+        [#include "boost/program_options.hpp"
+         #include "zlib.h"
+         #include "noop.h"],
         [-lboost_program_options -lpthread -lz],
         [-L $VOWPAL_WABBIT_LIB_DIR -I $VOWPAL_WABBIT_INCLUDE_DIR])
 fi
 
 
 AC_ARG_WITH([tools],
-	[AS_HELP_STRING([--without-tools], [exclude tools and build lib only])],
-	[if test "x$with_tools" = "xno"; then with_tools=false; else with_tools=true; fi],
-	[with_tools=true])
+        [AS_HELP_STRING([--without-tools], [exclude tools and build lib only])],
+        [if test "x$with_tools" = "xno"; then with_tools=false; else with_tools=true; fi],
+        [with_tools=true])
 
 
 AM_CONDITIONAL([WITH_TOOLS], [$with_tools])
 AM_CONDITIONAL([WITH_SMILE_TOOLS], [test "x$smile_state" = "xok"])
 AM_CONDITIONAL([WITH_SVM_TOOLS], [test "x$svm_perf_state" = "xok"])
+AM_CONDITIONAL([WITH_SVM_MULTICLASS_TOOLS], [test "x$svm_multiclass_state" = "xok"])
 AM_CONDITIONAL([WITH_SVM_LIBSRC], [test "x$svm_perf_state" = "xok"])
 AM_CONDITIONAL([WITH_VW_TOOLS], [test "x$vowpal_wabbit_state" = "xok"])
 AM_CONDITIONAL([WITH_READLINE_TOOLS], [test "x$readline_state" = "xok"])
 AC_CONFIG_FILES([Makefile \
                  src/Makefile \
                  tools/Makefile \
-		 tools/Answerer/Makefile \
-		 tools/Cliquer/Makefile \
-		 tools/Clinician/Makefile \
-		 tools/Clusterer/Makefile \
-		 tools/Clusters2Dab/Makefile \
-		 tools/COALESCE/Makefile \
-		 tools/Combiner/Makefile \
-		 tools/NetworkCombiner/Makefile \
-		 tools/DChecker/Makefile \
-		 tools/Dat2Dab/Makefile \
-		 tools/Dat2Graph/Makefile \
-		 tools/Data2Bnt/Makefile \
-		 tools/Data2Features/Makefile \
-		 tools/Data2Sql/Makefile \
-		 tools/DataDumper/Makefile \
-		 tools/Distancer/Makefile \
-		 tools/Explainer/Makefile \
-		 tools/Filterer/Makefile \
-		 tools/Funcaeologist/Makefile \
-		 tools/Funcifier/Makefile \
-		 tools/Funcographer/Makefile \
-		 tools/Hubber/Makefile \
-		 tools/KNNImputer/Makefile \
-		 tools/Mat2Txt/Makefile \
-		 tools/MCluster/Makefile \
-		 tools/Matcher/Makefile \
-		 tools/MIer/Makefile \
-		 tools/MIed/Makefile \
-		 tools/NetMiner/Makefile \
-		 tools/Normalizer/Makefile \
-		 tools/Orthologer/Makefile \
-		 tools/Overlapper/Makefile \
-		 tools/PCLPlotter/Makefile \
-		 tools/PCLServer/Makefile \
-		 tools/PCL2Bin/Makefile \
-		 tools/Randomizer/Makefile \
-		 tools/Seqs2Ngrams/Makefile \
-		 tools/SMRF/Makefile \
-		 tools/SVDer/Makefile \
-		 tools/Synthesizer/Makefile \
-		 tools/Txt2Bin/Makefile \
+                 tools/Answerer/Makefile \
+                 tools/Cliquer/Makefile \
+                 tools/Clinician/Makefile \
+                 tools/Clusterer/Makefile \
+                 tools/Clusters2Dab/Makefile \
+                 tools/COALESCE/Makefile \
+                 tools/Combiner/Makefile \
+                 tools/NetworkCombiner/Makefile \
+                 tools/DChecker/Makefile \
+                 tools/Dat2Dab/Makefile \
+                 tools/Dat2Graph/Makefile \
+                 tools/Data2Bnt/Makefile \
+                 tools/Data2Features/Makefile \
+                 tools/Data2Sql/Makefile \
+                 tools/DataDumper/Makefile \
+                 tools/Distancer/Makefile \
+                 tools/Explainer/Makefile \
+                 tools/Filterer/Makefile \
+                 tools/Funcaeologist/Makefile \
+                 tools/Funcifier/Makefile \
+                 tools/Funcographer/Makefile \
+                 tools/Hubber/Makefile \
+                 tools/KNNImputer/Makefile \
+                 tools/Mat2Txt/Makefile \
+                 tools/MCluster/Makefile \
+                 tools/Matcher/Makefile \
+                 tools/MIer/Makefile \
+                 tools/MIed/Makefile \
+                 tools/NetMiner/Makefile \
+                 tools/Normalizer/Makefile \
+                 tools/Orthologer/Makefile \
+                 tools/Overlapper/Makefile \
+                 tools/PCLPlotter/Makefile \
+                 tools/PCLServer/Makefile \
+                 tools/PCL2Bin/Makefile \
+                 tools/Randomizer/Makefile \
+                 tools/Seqs2Ngrams/Makefile \
+                 tools/SMRF/Makefile \
+                 tools/SVDer/Makefile \
+                 tools/Synthesizer/Makefile \
+                 tools/Txt2Bin/Makefile \
                  tools/BNConverter/Makefile \
-		 tools/BNCreator/Makefile \
-		 tools/SparseNetCombiner/Makefile \
-		 tools/SpeciesConnector/Makefile \
-		 tools/BNEvaluator/Makefile \
-		 tools/BNFunc/Makefile \
-		 tools/BNTester/Makefile \
-		 tools/BNTruster/Makefile \
-		 tools/BNs2Txt/Makefile \
-		 tools/BNUnraveler/Makefile \
-		 tools/BNWeaver/Makefile \
-		 tools/Contexter/Makefile \
-		 tools/Counter/Makefile \
-		 tools/Data2DB/Makefile \
-		 tools/SeekReader/Makefile \
-		 tools/SeekTest/Makefile \
-		 tools/SeekMiner/Makefile \
-		 tools/SeekPrep/Makefile \
-		 tools/SeekServer/Makefile \
-		 tools/SeekPValue/Makefile \
-		 tools/SeekEvaluator/Makefile \
-		 tools/SeekGeneRecommender/Makefile \
-		 tools/SeekAggregatedDataset/Makefile \
+                 tools/BNCreator/Makefile \
+                 tools/SparseNetCombiner/Makefile \
+                 tools/SpeciesConnector/Makefile \
+                 tools/BNEvaluator/Makefile \
+                 tools/BNFunc/Makefile \
+                 tools/BNTester/Makefile \
+                 tools/BNTruster/Makefile \
+                 tools/BNs2Txt/Makefile \
+                 tools/BNUnraveler/Makefile \
+                 tools/BNWeaver/Makefile \
+                 tools/Contexter/Makefile \
+                 tools/Counter/Makefile \
+                 tools/Data2DB/Makefile \
+                 tools/SeekReader/Makefile \
+                 tools/SeekTest/Makefile \
+                 tools/SeekMiner/Makefile \
+                 tools/SeekPrep/Makefile \
+                 tools/SeekServer/Makefile \
+                 tools/SeekPValue/Makefile \
+                 tools/SeekEvaluator/Makefile \
+                 tools/SeekGeneRecommender/Makefile \
+                 tools/SeekAggregatedDataset/Makefile \
          tools/DBCombiner/Makefile \
-		 tools/DSLConverter/Makefile \
-		 tools/Dab2Dad/Makefile \
-		 tools/Edges2Posteriors/Makefile \
-		 tools/MEFIT/Makefile \
+                 tools/DSLConverter/Makefile \
+                 tools/Dab2Dad/Makefile \
+                 tools/Edges2Posteriors/Makefile \
+                 tools/MEFIT/Makefile \
                  tools/Data2Svm/Makefile \
-		 tools/SVMer/Makefile \
-		 tools/SVMperfer/Makefile \
-		 tools/SVMperfing/Makefile \
-		 tools/LibSVMer/Makefile \
-		 tools/VWer/Makefile \
+                 tools/SVMer/Makefile \
+                 tools/SVMperfer/Makefile \
+                tools/SVMmulticlass/Makefile \
+                 tools/SVMperfing/Makefile \
+                 tools/LibSVMer/Makefile \
+                 tools/VWer/Makefile \
                  tools/OntoShell/Makefile \
                  tools/BNServer/Makefile])
 
 echo "  log4cpp                 = $log4cpp_info"
 echo "  SMILE                   = $smile_info"
 echo "  SVM Perf                = $svm_perf_info"
+echo "  SVM Multiclass                = $svm_multiclass_info"
 echo "  Vowpal Wabbit           = $vowpal_wabbit_info"
 echo "  pthread                 = $pthread_info"
 echo "  gsl                     = $gsl_info"
 fi
 
 if test "x$sleipnir_cv_openmp" != "xyes"; then
-	cat << EOF
+        cat << EOF
 ** BUILDING WITHOUT OpenMP SUPPORT
 OpenMP is essential for parallization in SEEK toolset.
 SeekServer, SeekGeneRecommender, SeekMiner will run on single thread.
-This is either because you have disabled OpenMP using --disable-openmp, or 
-you have an outdated version of GCC that does not support OpenMP. 
+This is either because you have disabled OpenMP using --disable-openmp, or
+you have an outdated version of GCC that does not support OpenMP.
 In the latter case, please obtain the latest GCC compiler from http://gcc.gnu.org/.
 EOF
 fi
 
 if test "x$gsl_state" != "xok"; then
-	cat << EOF
+        cat << EOF
 ** BUILDING WITHOUT GSL
 GNU GSL is required for building SEEK toolset.
 SeekServer, SeekGeneRecommender, SeekMiner would not be built.
 
 fi
 
+
+
+if test "x$svm_multiclass_state" != "xok"; then
+  cat << EOF
+
+** BUILDING WITHOUT SVM MULTICLASS
+SVM Multiclass is strongly recommended.
+It is available from http://svmlight.joachims.org/.
+EOF
+
+fi
+
+if test "x$svm_multiclass_state" = "xwarn"; then
+  cat << EOF
+** WARNING: The path to SVM Multiclass may be incorrect.
+I looked for svm_struct_api.h and libsvmmulticlass.a and did not
+find both. NOTE: You may need to make libsvmmulticlass.a. See the README.
+EOF
+
+fi
+
+
 if test "x$smile_state" = "xwarn"; then
   cat << EOF
 ** WARNING: The path to SMILE may be incorrect.
   cat << EOF
 ** WARNING: The path to LibSVM may be incorrect.
 I looked for  libsvm.a and did not
-find. NOTE: You may need to make liblibsvm.a. 
+find. NOTE: You may need to make liblibsvm.a.
 
 ar rcs liblibsvm.a *.o
 
 
 my $default_ggo_flags = "-u -N -e";
 my %tools_ggo_flags = (
-		     BNFunc => '-C -N -e',
-		     BNServer => '-C -N -e',
-		     Dat2Graph => '-C -N -e',
-		     Explainer => '-C -N -e',
-		     OntoFitter => '-C -u -N -e',
-		     OntoShell => '-C -N -e',
-		     OntoTrimmer => '-C -N -e',
-		     );
+                     BNFunc => '-C -N -e',
+                     BNServer => '-C -N -e',
+                     Dat2Graph => '-C -N -e',
+                     Explainer => '-C -N -e',
+                     OntoFitter => '-C -u -N -e',
+                     OntoShell => '-C -N -e',
+                     OntoTrimmer => '-C -N -e',
+                     );
 
 my $tools_common_cflags1 = "\$(SLEIPNIR_CFLAGS)";
 my $tools_common_cflags2 = " \$(LOG4CPP_CFLAGS) \$(PTHREAD_CFLAGS)";
 # packages are: SMILE, SVM_PERF, READLINE, PTHREADS, BOOST, VOWPAL_WABBIT, LIBSVM
 # ordering is important for linking
 my %tools_other_packages = (
-			    BNConverter => ['SMILE'],
-			    BNCreator => ['SMILE'],
-			    BNEvaluator => ['SMILE'],
-			    BNServer => ['SMILE', 'BOOST'],
-			    BNTester => ['SMILE'],
-			    BNTruster => ['SMILE'],
-			    BNUnraveler => ['SMILE'],
-			    BNWeaver => ['SMILE'],
-			    BNs2Txt => ['SMILE'],
-			    SpeciesConnector => ['SMILE'],
-#			    BNWrangler => ['SMILE'],
-			    Contexter  => ['SMILE'],
-			    Counter  => ['SMILE'],
-			    DSLConverter  => ['SMILE'],
-			    Data2DB  => ['SMILE'],
-				DBCombiner => ['SMILE'],
-				SeekTest => ['GSL'],
-				SeekReader => ['GSL'],
-				SeekEvaluator => ['GSL'],
-				SeekPrep => ['GSL'],
-				SeekMiner => ['GSL'],
-				SeekServer => ['GSL'],
-				SeekPValue => ['GSL'],
-				SeekGeneRecommender => ['GSL'],
-				SeekAggregatedDataset => ['GSL'],
-				PCLServer => ['GSL'],
-			    Dab2Dad  => ['SMILE'],
-			    Dab2DB  => ['SMILE'],
-			    Data2Svm => ['SVM_PERF'],
-			    Edges2Posteriors => ['SMILE'],
-			    MEFIT  => ['SMILE'],
-			    OntoShell => ['READLINE'],
-			    SVMer => ['SVM_PERF'],
-			    SVMperfer => ['SVM_PERF'],
-			    SVMperfing => ['SVM_PERF'],
-			    LibSVMer => ['LIBSVM'],
-			    VWer => ['VOWPAL_WABBIT'],
-			    );
+                            BNConverter => ['SMILE'],
+                            BNCreator => ['SMILE'],
+                            BNEvaluator => ['SMILE'],
+                            BNServer => ['SMILE', 'BOOST'],
+                            BNTester => ['SMILE'],
+                            BNTruster => ['SMILE'],
+                            BNUnraveler => ['SMILE'],
+                            BNWeaver => ['SMILE'],
+                            BNs2Txt => ['SMILE'],
+                            SpeciesConnector => ['SMILE'],
+#                           BNWrangler => ['SMILE'],
+                            Contexter  => ['SMILE'],
+                            Counter  => ['SMILE'],
+                            DSLConverter  => ['SMILE'],
+                            Data2DB  => ['SMILE'],
+                                DBCombiner => ['SMILE'],
+                                SeekTest => ['GSL'],
+                                SeekReader => ['GSL'],
+                                SeekEvaluator => ['GSL'],
+                                SeekPrep => ['GSL'],
+                                SeekMiner => ['GSL'],
+                                SeekServer => ['GSL'],
+                                SeekPValue => ['GSL'],
+                                SeekGeneRecommender => ['GSL'],
+                                SeekAggregatedDataset => ['GSL'],
+                                PCLServer => ['GSL'],
+                            Dab2Dad  => ['SMILE'],
+                            Dab2DB  => ['SMILE'],
+                            Data2Svm => ['SVM_PERF'],
+                            Edges2Posteriors => ['SMILE'],
+                            MEFIT  => ['SMILE'],
+                            OntoShell => ['READLINE'],
+                            SVMer => ['SVM_PERF'],
+                            SVMperfer => ['SVM_PERF'],
+                            SVMmulticlass => ['SVM_MULTICLASS'],
+                            SVMperfing => ['SVM_PERF'],
+                            LibSVMer => ['LIBSVM'],
+                            VWer => ['VOWPAL_WABBIT'],
+                            );
 
 if (opendir(TOOLSDIR, "tools")) {
     my $dent;
     while ($dent = readdir(TOOLSDIR)) {
-	next if ($dent =~ /^\.\.?$/);
-	if (-d "tools/$dent") {
-	    if (opendir(TOOLDIR, "tools/$dent")) {
-		my @src_files;
-		my @header_files;
-		my $ggo_file;
-		my $dent2;
-		while ($dent2 = readdir(TOOLDIR)) {
-		    next if ($dent2 =~ /^cmdline\.[ch]$/);
-		    if ($dent2 =~ /\.(c|cpp)$/) {
-			push(@src_files, $dent2);
-		    } elsif ($dent2 =~ /\.h$/) {
-			push(@header_files, $dent2);
-		    } elsif ($dent2 =~ /\.ggo$/) {
-			$ggo_file = $dent2;
-		    }
-		}
-		close(TOOLDIR);
-		if (open(AM_MAKEFILE, "> tools/$dent/Makefile.am")) {
-		    print AM_MAKEFILE "bin_PROGRAMS = $dent\n";
-		    my $extra_cflags = "";
-		    my $extra_libs = "";
-		    my $pkgs = $tools_other_packages{$dent};
-		    for (my $i = 0; $i <= $#$pkgs; $i++) {
-			$extra_cflags .= " \$(".$pkgs->[$i]."_CFLAGS)";
-			$extra_libs .= " \$(".$pkgs->[$i]."_LIBS)";
-		    }
-		    print AM_MAKEFILE "AM_CPPFLAGS = ".$tools_common_cflags1.$extra_cflags.$tools_common_cflags2."\n";
-		    print AM_MAKEFILE "LDADD = ".$tools_common_libs1.$extra_libs.$tools_common_libs2."\n";
-#		    print AM_MAKEFILE "AM_CPPFLAGS = \$(SLEIPNIR_CFLAGS) \$(SMILE_CFLAGS) \$(SVM_PERF_CFLAGS) \$(GENGETOPT_CFLAGS) \$(LOG4CPP_CFLAGS) \$(BOOST_CFLAGS) \$(READLINE_CFLAGS)\n";
-#		    print AM_MAKEFILE "LDADD = \$(SLEIPNIR_LIBS) \$(SMILE_LIBS) \$(SVM_PERF_LIBS) \$(GENGETOPT_LIBS) \$(LOG4CPP_LIBS) \$(BOOST_LIBS) \$(READLINE_LIBS)\n";
-		    if ($ggo_file) {
-			print AM_MAKEFILE "\nif WITH_GENGETOPT\n";
-			print AM_MAKEFILE "gengetopt = \$(prog_gengetopt)\n";
-			print AM_MAKEFILE "BUILT_SOURCES = cmdline.c cmdline.h\n";
-			print AM_MAKEFILE "cmdline.c cmdline.h: $ggo_file\n";
+        next if ($dent =~ /^\.\.?$/);
+        if (-d "tools/$dent") {
+            if (opendir(TOOLDIR, "tools/$dent")) {
+                my @src_files;
+                my @header_files;
+                my $ggo_file;
+                my $dent2;
+                while ($dent2 = readdir(TOOLDIR)) {
+                    next if ($dent2 =~ /^cmdline\.[ch]$/);
+                    if ($dent2 =~ /\.(c|cpp)$/) {
+                        push(@src_files, $dent2);
+                    } elsif ($dent2 =~ /\.h$/) {
+                        push(@header_files, $dent2);
+                    } elsif ($dent2 =~ /\.ggo$/) {
+                        $ggo_file = $dent2;
+                    }
+                }
+                close(TOOLDIR);
+                if (open(AM_MAKEFILE, "> tools/$dent/Makefile.am")) {
+                    print AM_MAKEFILE "bin_PROGRAMS = $dent\n";
+                    my $extra_cflags = "";
+                    my $extra_libs = "";
+                    my $pkgs = $tools_other_packages{$dent};
+                    for (my $i = 0; $i <= $#$pkgs; $i++) {
+                        $extra_cflags .= " \$(".$pkgs->[$i]."_CFLAGS)";
+                        $extra_libs .= " \$(".$pkgs->[$i]."_LIBS)";
+                    }
+                    print AM_MAKEFILE "AM_CPPFLAGS = ".$tools_common_cflags1.$extra_cflags.$tools_common_cflags2."\n";
+                    print AM_MAKEFILE "LDADD = ".$tools_common_libs1.$extra_libs.$tools_common_libs2."\n";
+#                   print AM_MAKEFILE "AM_CPPFLAGS = \$(SLEIPNIR_CFLAGS) \$(SMILE_CFLAGS) \$(SVM_PERF_CFLAGS) \$(GENGETOPT_CFLAGS) \$(LOG4CPP_CFLAGS) \$(BOOST_CFLAGS) \$(READLINE_CFLAGS)\n";
+#                   print AM_MAKEFILE "LDADD = \$(SLEIPNIR_LIBS) \$(SMILE_LIBS) \$(SVM_PERF_LIBS) \$(GENGETOPT_LIBS) \$(LOG4CPP_LIBS) \$(BOOST_LIBS) \$(READLINE_LIBS)\n";
+                    if ($ggo_file) {
+                        print AM_MAKEFILE "\nif WITH_GENGETOPT\n";
+                        print AM_MAKEFILE "gengetopt = \$(prog_gengetopt)\n";
+                        print AM_MAKEFILE "BUILT_SOURCES = cmdline.c cmdline.h\n";
+                        print AM_MAKEFILE "cmdline.c cmdline.h: $ggo_file\n";
 #			print AM_MAKEFILE "cmdline.c: $ggo_file\n";
-			print AM_MAKEFILE "\t\$(gengetopt) -i".$ggo_file." --default-optional ";
-			if ($tools_ggo_flags{$dent}) {
-			    print AM_MAKEFILE $tools_ggo_flags{$dent};
-			} else {
-			    print AM_MAKEFILE $default_ggo_flags;
-			}
-			print AM_MAKEFILE "\nendif\n";
-			push(@src_files, "cmdline.c");
-			push(@header_files, "cmdline.h");
-		    }
-		    print AM_MAKEFILE $dent."_SOURCES = ", join(" ", @src_files), " \\\n\t", join(" ", @header_files), "\n";
-		    close(AM_MAKEFILE);
-		}
-	    } else {
-		die;
-	    }
-	}
+                        print AM_MAKEFILE "\t\$(gengetopt) -i".$ggo_file." --default-optional ";
+                        if ($tools_ggo_flags{$dent}) {
+                            print AM_MAKEFILE $tools_ggo_flags{$dent};
+                        } else {
+                            print AM_MAKEFILE $default_ggo_flags;
+                        }
+                        print AM_MAKEFILE "\nendif\n";
+                        push(@src_files, "cmdline.c");
+                        push(@header_files, "cmdline.h");
+                    }
+                    print AM_MAKEFILE $dent."_SOURCES = ", join(" ", @src_files), " \\\n\t", join(" ", @header_files), "\n";
+                    close(AM_MAKEFILE);
+                }
+            } else {
+                die;
+            }
+        }
     }
     close(TOOLSDIR);
 } else {
 lib_LIBRARIES			= libSleipnir.a
 
-AM_CPPFLAGS = $(GSL_CFLAGS) $(LOG4CPP_CFLAGS) $(SMILE_CFLAGS) $(SVM_PERF_CFLAGS) $(PTHREAD_CFLAGS) $(VOWPAL_WABBIT_CFLAGS) $(LIBSVM_CFLAGS)
+AM_CPPFLAGS = $(GSL_CFLAGS) $(LOG4CPP_CFLAGS) $(SMILE_CFLAGS) $(SVM_PERF_CFLAGS) $(SVM_MULTICLASS_CFLAGS) $(PTHREAD_CFLAGS) $(VOWPAL_WABBIT_CFLAGS) $(LIBSVM_CFLAGS)
 
-#LDADD = $(LOG4CPP_LIBS) $(SMILE_LIBS) $(SVM_PERF_LIBS) $(PTHREAD_LIBS)
+#LDADD = $(LOG4CPP_LIBS) $(SMILE_LIBS) $(SVM_PERF_LIBS) $(SVM_MULTICLASS_LIBS) $(PTHREAD_LIBS)
 
 if WITH_SVM_TOOLS
 libSleipnir_SVM_SOURCES = svm.cpp svmperf.cpp
 libSleipnir_SVM_INCLUDES = svm.h svmi.h svmperf.h
 endif
 
+if WITH_SVM_MULTICLASS_TOOLS
+libSleipnir_SVM_MULTICLASS_SOURCES = svmstruct.cpp
+libSleipnir_SVM_MULTICLASS_INCLUDES = svmstruct.h
+endif
+
 if WITH_LIBSVM_TOOLS
 libSleipnir_LIBSVM_SOURCES = libsvm.cpp
 libSleipnir_LIBSVM_INCLUDES = libsvm.h
 	seekwriter.cpp			\
 	seekplatform.cpp		\
 	seekcentral.cpp		\
-	seeknetwork.cpp	
+	seeknetwork.cpp
 libSleipnir_GSL_INCLUDES = \
 	seekplatform.h			\
 	seekcentral.h			\
 	seekwriter.h			\
 	seekdataset.h			\
 	seekmap.h				\
-	seeknetwork.h	
+	seeknetwork.h
 endif
 libSleipnir_a_SOURCES	=	\
 	annotation.cpp			\
 	$(libSleipnir_SVM_SOURCES) \
 	$(libSleipnir_GSL_SOURCES) \
 	$(libSleipnir_LIBSVM_SOURCES) \
+	$(libSleipnir_SVM_MULTICLASS_SOURCES)\
 	vwb.cpp
 include_HEADERS			=	\
 	annotation.h			\
 	$(libSleipnir_SVM_INCLUDES)  \
 	$(libSleipnir_GSL_SOURCES) \
 	$(libSleipnir_LIBSVM_INCLUDES) \
+	$(libSleipnir_SVM_MULTICLASS_INCLUDES)\
 	trie.h					\
 	triei.h					\
 	typesi.h				\

tools/Makefile.am

 if WITH_TOOLS
   TOOLS_SUBDIRS = \
-          Answerer \
+	  Answerer \
 	  Cliquer \
 	  Clinician \
 	  Clusterer \
 	  Txt2Bin
 if WITH_SMILE_TOOLS
     SMILE_TOOLS_SUBDIRS = \
-          BNConverter \
+	  BNConverter \
 	  BNCreator \
 	  SpeciesConnector \
 	  BNEvaluator \
 endif
 if WITH_SVM_TOOLS
     SVM_TOOLS_SUBDIRS = \
-          Data2Svm \
+	  Data2Svm \
 	  SVMer \
 	  SVMperfing \
 	  SVMperfer
 endif
+if WITH_SVM_MULTICLASS_TOOLS
+    SVM_MULTICLASS_SUBDIRS = \
+		SVMmulticlass
+endif
+
 if WITH_LIBSVM_TOOLS
     LIBSVM_TOOLS_SUBDIRS = \
 	  LibSVMer
 endif
 endif
 
-SUBDIRS = $(TOOLS_SUBDIRS) $(SMILE_TOOLS_SUBDIRS) $(BOOST_TOOLS_SUBDIRS) $(SVM_TOOLS_SUBDIRS) $(READLINE_TOOLS_SUBDIRS) $(VW_TOOLS_SUBDIRS) $(GSL_TOOLS_SUBDIRS) $(LIBSVM_TOOLS_SUBDIRS)
+SUBDIRS = $(TOOLS_SUBDIRS) $(SMILE_TOOLS_SUBDIRS) $(BOOST_TOOLS_SUBDIRS) $(SVM_TOOLS_SUBDIRS) $(READLINE_TOOLS_SUBDIRS) $(VW_TOOLS_SUBDIRS) $(GSL_TOOLS_SUBDIRS) $(LIBSVM_TOOLS_SUBDIRS) $(SVM_MULTICLASS_TOOLS_SUBDIRS)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.