Added configuration and logging for lightcontrol
[wakeup.git] / configure.ac
index 3dabdf3..081ba58 100644 (file)
@@ -18,6 +18,25 @@ AC_CHECK_LIB([ACL], [Now])
 AC_CHECK_LIB([Tachyon], [main])
 # FIXME: Replace `main' with a function in `-lrt':
 AC_CHECK_LIB([rt], [main])
+# FIXME: Replace `main' with a function in `-lpthread':
+AC_CHECK_LIB([pthread], [main])
+
+
+AC_PATH_PROG(XML_CONFIG,xml2-config,no)
+
+if test $XML_CONFIG = "no" 
+then
+   echo "XML library not found (see http://xmlsoft.org/)."
+   exit 1;
+fi
+
+XML_CFLAGS=`$XML_CONFIG --cflags`
+XML_LFLAGS=`$XML_CONFIG --libs`
+AC_CHECK_LIB(xml2, xmlParseFile)
+
+
+CXXFLAGS="$CXXFLAGS $XML_CFLAGS -Wall"
+LDFLAGS="$LDFLAGS $XML_LFLAGS"
 
 # Checks for header files.
 AC_CHECK_HEADERS([fcntl.h stdlib.h unistd.h])