YOUNG-SUK LEE avatar YOUNG-SUK LEE committed 2753e2b

configure.ac weird behavior

Comments (0)

Files changed (2)

 #    export CFLAGS="$CFLAGS $13"
     LIBS="$13 $LIBS"
   fi
+
+echo $13
+echo "$3"
+echo $13
+#echo $3
+
   AC_LINK_IFELSE(
     [AC_LANG_PROGRAM([[$11]], [[$3]])],
     [
+echo 'here'
+echo x${$2_state}
      if test "x${$2_state}" = "xtry"; then
+echo 'here2'
        $2_info=${with_$2}
 #       qualify_path with_$2
        $4
        $6
      else
+echo 'here1'
        $2_info="found installed"
        $4
        $5
     ],
     [found=false])
   LIBS=$oLIBS
+
+echo 'youngl'
 #  if test "x${$2_state}" = "xtry"; then
 #    CFLAGS=$oCFLAGS
 #  fi
 AC_SUBST(SMILE_CFLAGS)
 AC_SUBST(SMILE_LIBS)
 
-
 ## SVM PERF
 # If the user specifies a path, use it.
 # If the user says not to use it, then don't.
         [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
 if test "x$svm_perf_state" != "xok"; then
 # If none, set NO_LIBLINEAR=1.
 AC_ARG_WITH([liblinear],
         [AS_HELP_STRING([--with-liblinear=PATH], [prefix of Liblinear installation])],
-        [
+        [ 
          if test "x$with_liblinear" = "xyes"; then
            liblinear_state=check
          elif test "x$with_liblinear" != "xno"; then
            liblinear_state=try
            qualify_path with_liblinear
-#           LOCAL_CHECK_APPEND_PATHS([$with_liblinear], [. include], [svm_struct_api.h], [LIBLINEAR_INCLUDE_DIR], [liblinear_state=warn])
+           LOCAL_CHECK_APPEND_PATHS([$with_liblinear], [. include], [linear.h], [LIBLINEAR_INCLUDE_DIR], [liblinear_state=warn])
            LOCAL_CHECK_APPEND_PATHS([$with_liblinear], [. lib], [libliblinear.a], [LIBLINEAR_LIB_DIR], [liblinear_state=warn])
          else
            liblinear_state=no
         ],
         [liblinear_state=check])
 AC_LANG_PUSH([C])
-LOCAL_CHECK_LIB([liblinear],
+LOCAL_CHECK_LIB([liblinear],[lib_linear],[optimize_linear],
         [liblinear_state=ok],                                      dnl found
         [LIBLINEAR_LIBS="-lliblinear"],                              dnl and found installed
         [
-         LIBLINEAR_CFLAGS="-I $LIBLINEAR_INCLUDE_DIR"
+	 LIBLINEAR_CFLAGS="-I $LIBLINEAR_INCLUDE_DIR"
          LIBLINEAR_LIBS="-L $LIBLINEAR_LIB_DIR -lliblinear"
         ],                                                        dnl and found in specified path
         [],                                                       dnl not found
         [liblinear_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 "linear.h",
+	#include "tron.h"],
+	[],
         [-L $LIBLINEAR_LIB_DIR -I $LIBLINEAR_INCLUDE_DIR])
 AC_LANG_POP
 if test "x$liblinear_state" != "xok"; then
 
 
 
-
 ## BOOST
 # If the user specifies a path, use it.
 # If not specified, check for it.
                  tools/Data2Svm/Makefile \
 		 tools/SVMer/Makefile \
 		 tools/SVMperfer/Makefile \
-		tools/Liblinear/Makefile \
+		tools/Liblinearer/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 "  LIBLINEAR		= $liblinear_info"
+echo "  LIBLINEAR               = $liblinear_info"
 echo "  Vowpal Wabbit           = $vowpal_wabbit_info"
 echo "  pthread                 = $pthread_info"
 if $with_tools; then
 if test "x$liblinear_state" = "xwarn"; then
   cat << EOF
 ** WARNING: The path to liblinear may be incorrect.
-I looked for liblinear.a and did not find it.  NOTE: You may need to make libliblinear.a: 
+I looked for liblinear.a and did not find it.  
+NOTE: You may need to make libliblinear.a: 
 
 ar rcs libliblinear.a *.o
 

tools/Liblinearer/Makefile.am

 bin_PROGRAMS = Liblinearer
-AM_CPPFLAGS = $(SLEIPNIR_CFLAGS) $(LOG4CPP_CFLAGS) $(PTHREAD_CFLAGS)
-LDADD = $(SLEIPNIR_LIBS) $(LOG4CPP_LIBS) $(PTHREAD_LIBS)
+AM_CPPFLAGS = $(SLEIPNIR_CFLAGS) $(LIBLINEAR_CFLAGS) $(LOG4CPP_CFLAGS) $(PTHREAD_CFLAGS)
+LDADD = $(SLEIPNIR_LIBS) $(LIBLINEAR_LIBS) $(LOG4CPP_LIBS) $(PTHREAD_LIBS)
 
 if WITH_GENGETOPT
 gengetopt = $(prog_gengetopt)
 BUILT_SOURCES = cmdline.c cmdline.h
-cmdline.c cmdline.h: SVMperfer.ggo
-	$(gengetopt) -iSVMperfer.ggo --default-optional -u -N -e
+cmdline.c cmdline.h: Liblinearer.ggo
+	$(gengetopt) -iLiblinearer.ggo --default-optional -u -N -e
 endif
-Liblinearer_SOURCES = stdafx.cpp SVMperfer.cpp cmdline.c \
+Liblinearer_SOURCES = stdafx.cpp Liblinearer.cpp SVMperfer.cpp cmdline.c \
 	stdafx.h cmdline.h
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.