Commits

Qian Zhu committed 9b9c1e5

Configure step: --with-boost=<path> is now recognized

Comments (0)

Files changed (3)

         fi
     ],
         [smile_state=check])
-        LOCAL_CHECK_LIB([smile], [smile], [DSL_isFinite(1.0)],
 
+LOCAL_CHECK_LIB([smile], [smile], [DSL_isFinite(1.0)],
     [smile_state=ok],                                         dnl found
     [
             SMILE_LIBS="-lsmile"
          fi
         ],
         [boost_state=check])
-LOCAL_CHECK_LIB([boost_graph], [boost], [],
+AC_LANG_PUSH([C++])
+LOCAL_CHECK_LIB([boost_graph], [boost],
+		[using namespace boost; typedef adjacency_list< vecS, vecS, directedS, property< vertex_color_t, default_color_type >, property< edge_weight_t, double > > Graph],
         [boost_state=ok],                                         dnl found
-        [],                                                       dnl and found installed
-        [],                                                       dnl and found in specified path
+        [BOOST_LIBS="-lboost_graph"], 				              dnl and found installed
+        [
+         BOOST_CFLAGS="-I $BOOST_INCLUDE_DIR"
+         BOOST_LIBS="-L $BOOST_LIB_DIR -lboost_graph"
+        ],                                                        dnl and found in specified path
         [],                                                       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"],
-        [],
+		[],
         [-L $BOOST_LIB_DIR -I $BOOST_INCLUDE_DIR])
+AC_LANG_POP
+
 if test "x$boost_state" = "xok"; then
-LOCAL_CHECK_LIB([boost_regex], [boost], [],
+boost_state=try
+AC_LANG_PUSH([C++])
+LOCAL_CHECK_LIB([boost_regex], [boost], 
+		[boost::regex e("(\\d{4}[- ]){3}\\d{4}")],
         [boost_state=ok],                                         dnl found
         [BOOST_LIBS="-lboost_graph -lboost_regex"],               dnl and found installed
         [
         [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/regex.hpp"],
+		[],
         [-L $BOOST_LIB_DIR -I $BOOST_INCLUDE_DIR])
+AC_LANG_POP
 fi
 if test "x$boost_state" != "xok"; then
   AC_DEFINE([NO_BOOST], [1])
-./configure --prefix=/memex/qzhu/sleipnir_build --with-log4cpp=/memex/qzhu/usr --with-smile=/memex/qzhu/packages/sleipnir/smile --with-svm-perf=/memex/qzhu/packages/sleipnir/svmperf
+./configure --prefix=/memex/qzhu/sleipnir_build --with-log4cpp=/memex/qzhu/usr --with-smile=/memex/qzhu/packages/sleipnir/smile --with-svm-perf=/memex/qzhu/packages/sleipnir/svmperf --with-boost=/memex/qzhu/usr
 lib_LIBRARIES			= libSleipnir.a
 
-AM_CPPFLAGS = $(GSL_CFLAGS) $(LOG4CPP_CFLAGS) $(SMILE_CFLAGS) $(SVM_PERF_CFLAGS) $(SVM_MULTICLASS_CFLAGS) $(SVM_HIERARCHY_CFLAGS) $(PTHREAD_CFLAGS) $(VOWPAL_WABBIT_CFLAGS) $(LIBSVM_CFLAGS)
+AM_CPPFLAGS = $(BOOST_CFLAGS) $(GSL_CFLAGS) $(LOG4CPP_CFLAGS) $(SMILE_CFLAGS) $(SVM_PERF_CFLAGS) $(SVM_MULTICLASS_CFLAGS) $(SVM_HIERARCHY_CFLAGS) $(PTHREAD_CFLAGS) $(VOWPAL_WABBIT_CFLAGS) $(LIBSVM_CFLAGS)
 
 #LDADD = $(LOG4CPP_LIBS) $(SMILE_LIBS) $(SVM_PERF_LIBS) $(SVM_MULTICLASS_LIBS) $(SVM_HIERARCHY_LIBS) $(PTHREAD_LIBS)