summaryrefslogtreecommitdiff
path: root/server/configure.in
diff options
context:
space:
mode:
authordeva <deva>2010-06-01 12:58:32 +0000
committerdeva <deva>2010-06-01 12:58:32 +0000
commit74a28aa7125be6a603128ad600c98c4882f3b5c2 (patch)
tree1a9e4ab74f29d5ff10f2701e4e112f4525c0dcec /server/configure.in
parent9b9c1e2dd3e5807ff7714b378b03b9ba31f42df7 (diff)
From new_protocol branch.
Diffstat (limited to 'server/configure.in')
-rw-r--r--server/configure.in90
1 files changed, 74 insertions, 16 deletions
diff --git a/server/configure.in b/server/configure.in
index b6beada..23a7172 100644
--- a/server/configure.in
+++ b/server/configure.in
@@ -1,7 +1,7 @@
# Filename: configure.in
AC_INIT(src/pracrod.cc)
-AM_INIT_AUTOMAKE( pracrod, 1.2.0 )
+AM_INIT_AUTOMAKE( pracrod, 1.1.0 )
dnl ======================
dnl Compile with debug options
@@ -17,15 +17,17 @@ if test x$with_debug == xyes; then
fi
dnl ======================
-dnl Compile without pentominos support
+dnl Compile with artefact support
dnl ======================
-AC_ARG_WITH(pentominos,
- [ --with-pentominos build with pentominos support (default=yes)],
+AC_ARG_WITH(artefact,
+ [ --with-artefact build with artefact support (default=yes)],
[],
- [with_pentominos=yes])
-if test x$with_pentominos == xno; then
- AC_MSG_WARN([*** Building without pentominos support!])
- AC_DEFINE_UNQUOTED(WITHOUT_PENTOMINOS, , [The project is configured not to use pentomimos])
+ [with_artefact=yes])
+if test x$with_artefact == xyes; then
+ PKG_CHECK_MODULES(ATF, libartefact >= 0.0.2)
+else
+ AC_MSG_WARN([*** Building without artefact support!])
+ AC_DEFINE_UNQUOTED(WITHOUT_ARTEFACT, , [The project is configured not to use artefact])
fi
dnl ======================
@@ -57,6 +59,23 @@ else
PKG_CHECK_MODULES(PQXX, libpqxx >= 2.6.8)
fi
+dnl ======================
+dnl Compile with ssl support?
+dnl ======================
+AC_ARG_WITH(ssl,
+ [ --with-ssl build with ssl support, requires microhttpd to be build with ssl support (default=yes)],
+ [],
+ [with_ssl=yes])
+if test x$with_ssl == xno; then
+ AC_MSG_WARN([*** Building without ssl support!])
+ AC_DEFINE_UNQUOTED(WITHOUT_SSL, , [The project is configured not to use ssl])
+else
+ AC_MSG_WARN([*** Building with ssl support!])
+ dnl ======================
+ dnl TODO: Check for ssl support in microhttpd
+ dnl ======================
+fi
+
AC_PROG_CXX
AC_PROG_LIBTOOL
@@ -126,20 +145,59 @@ dnl ======================
PKG_CHECK_MODULES(CONFIG, libconfig++ >= 1.0.1)
dnl ======================
-dnl Check for libartefact
+dnl Check for libmicrohttpd
dnl ======================
-PKG_CHECK_MODULES(ATF, libartefact >= 0.1.0)
+PKG_CHECK_MODULES(HTTPD, libmicrohttpd >= 0.4.4)
dnl ======================
dnl Check for eXpat library
dnl ======================
+tmp_CXXFLAGS="$CXXFLAGS"
+tmp_CPPFLAGS="$CPPFLAGS"
+tmp_CFLAGS="$CFLAGS"
+tmp_LDFLAGS="$LDFLAGS"
+tmp_LIBS="$LIBS"
+CXXFLAGS=""
+CPPFLAGS=""
+CFLAGS=""
+LDFLAGS=""
+LIBS=""
AC_CHECK_HEADER(expat.h, , AC_MSG_ERROR([*** eXpat header file not found!]))
-AC_CHECK_LIB(expat, XML_ParserCreate, , AC_MSG_ERROR([*** eXpat library not found!]))
-
-AC_SUBST(CFLAGS)
-AC_SUBST(CPPFLAGS)
-AC_SUBST(CXXFLAGS)
-AC_SUBST(LDFLAGS)
+AC_CHECK_LIB(expat, XML_ParserCreate, , AC_MSG_ERROR([*** eXpat library not found!]))
+EXPAT_CFLAGS="$CXXFLAGS $CPPFLAGS $CFLAGS"
+EXPAT_LIBS="$LDFLAGS $LIBS"
+CXXFLAGS="$tmp_CXXFLAGS"
+CPPFLAGS="$tmp_CPPFLAGS"
+CFLAGS="$tmp_CFLAGS"
+LDFLAGS="$tmp_LDFLAGS"
+LIBS="$tmp_LIBS"
+AC_SUBST(EXPAT_CFLAGS)
+AC_SUBST(EXPAT_LIBS)
+
+dnl ======================
+dnl Check for the pthread library
+dnl ======================
+tmp_CXXFLAGS="$CXXFLAGS"
+tmp_CPPFLAGS="$CPPFLAGS"
+tmp_CFLAGS="$CFLAGS"
+tmp_LDFLAGS="$LDFLAGS"
+tmp_LIBS="$LIBS"
+CXXFLAGS=""
+CPPFLAGS=""
+CFLAGS=""
+LDFLAGS=""
+LIBS=""
+AC_CHECK_HEADER(pthread.h, , AC_MSG_ERROR([*** pthread header file not found!]))
+AC_CHECK_LIB(pthread, pthread_mutex_init, , AC_MSG_ERROR([*** pthread library not found!]))
+PTHREAD_CFLAGS="$CXXFLAGS $CPPFLAGS $CFLAGS"
+PTHREAD_LIBS="$LDFLAGS $LIBS"
+CXXFLAGS="$tmp_CXXFLAGS"
+CPPFLAGS="$tmp_CPPFLAGS"
+CFLAGS="$tmp_CFLAGS"
+LDFLAGS="$tmp_LDFLAGS"
+LIBS="$tmp_LIBS"
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_LIBS)
AC_OUTPUT(
Makefile