Browse Source

faux: Use external libfaux

Serj Kalichev 3 years ago
parent
commit
3678c1a099
1 changed files with 28 additions and 0 deletions
  1. 28 0
      configure.ac

+ 28 - 0
configure.ac

@@ -87,6 +87,33 @@ AC_ARG_ENABLE(testc,
               [enable_testc=no])
 AM_CONDITIONAL(TESTC,test x$enable_testc = xyes)
 
+
+################################
+# Check for mandatory faux library
+################################
+AC_ARG_WITH(faux,
+            [AS_HELP_STRING([--with-faux=DIR],
+                            [Search DIR directory for faux library files [default=yes]])],
+            [use_faux=$withval],
+            [use_faux=yes])
+
+AS_IF([test x$use_faux != xyes],
+  [
+    CPPFLAGS="-I${use_faux} ${CPPFLAGS}"
+    LDFLAGS="-L${use_faux}/.libs ${LDFLAGS}"
+  ]
+)
+
+AC_CHECK_HEADERS([faux/faux.h],
+	[],
+	[AC_MSG_ERROR([cannot find <faux/faux.h> header file])]
+	)
+AC_SEARCH_LIBS([faux_zmalloc], [faux],
+	[],
+	[AC_MSG_ERROR([cannot find working faux library])]
+	)
+
+
 ################################
 # Check for Lua support
 ################################
@@ -107,6 +134,7 @@ if test x$use_lua != xno; then
     AX_LUA_LIBS()
 fi
 
+
 ################################
 # Check for the roxml library
 ################################