--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
 VERSION="0.1.0"
 LT_VERSION="0:1:0"
 
-UCOMMON_REQUIRES="6.0.0"
+UCOMMON_REQUIRES="4.0.0"
 
 AC_CONFIG_AUX_DIR(autoconf)
 AC_CANONICAL_SYSTEM
@@ -14,7 +14,7 @@
 AC_LIBTOOL_WIN32_DLL
 AM_PROG_LIBTOOL
 AM_INIT_AUTOMAKE(apennine, [$VERSION])
-AM_CONFIG_HEADER(apennine-config.h)
+AM_CONFIG_HEADER(config.h)
 
 AC_C_RESTRICT
 AC_C_VOLATILE
@@ -57,6 +57,7 @@
     PKG_CHECK_MODULES(UCOMMON, ucommon >= $UCOMMON_REQUIRES)
     UCOMMON_CLINK=`pkg-config --variable=clink ucommon`
     UCOMMON_MODEL=`pkg-config --variable=model ucommon`
+	UCOMMON_SECURE=`pkg-config --variable=secure ucommon`
 ],[
     AC_PATH_PROG([UCOMMON],[ucommon-config],[none])
     if test $UCOMMON = "none" ; then
@@ -66,6 +67,7 @@
     UCOMMON_MODEL=`$UCOMMON --model`
     UCOMMON_CFLAGS=`$UCOMMON --cflags`
     UCOMMON_LIBS=`$UCOMMON --libs`
+	UCOMMON_SECURE=`$UCOMMON --secure`
 ])
 
 if test "$UCOMMON_MODEL" = "CC" ; then
@@ -88,27 +90,27 @@
     )
 )
 if test "$ac_cv_libc_sigwait2" = "yes" ; then
-    AC_DEFINE(HAVE_SIGWAIT2, [1], [2 argument form])
-    AC_DEFINE(HAVE_SIGWAIT, [1], [have sigwait])
+	AC_DEFINE(HAVE_SIGWAIT2, [1], [2 argument form])
+	AC_DEFINE(HAVE_SIGWAIT, [1], [have sigwait])
 else
-    AC_CACHE_CHECK(whether has any sigwait support,
-        ac_cv_libc_sigwait,
-        AC_TRY_COMPILE([
-            #define _POSIX_PTHREAD_SEMANTICS
-            #define _GNU_SOURCE
-            #include <stdio.h>
-            #include <signal.h>],
-            [sigset_t sigs; int signo = sigwait(&sigs);],
-            ac_cv_libc_sigwait2=yes,
-            ac_cv_libc_sigwait2=no
-        )
-    )
+	AC_CACHE_CHECK(whether has any sigwait support,
+		ac_cv_libc_sigwait,
+		AC_TRY_COMPILE([
+			#define _POSIX_PTHREAD_SEMANTICS
+			#define	_GNU_SOURCE
+			#include <stdio.h>
+			#include <signal.h>],
+			[sigset_t sigs; int signo = sigwait(&sigs);],
+			ac_cv_libc_sigwait2=yes,
+			ac_cv_libc_sigwait2=no
+		)	
+	)
 
-    if test "$ac_cv_libc_sigwait" = "yes" ; then
-        AC_DEFINE(HAVE_SIGWAIT, [1], [have sigwait])
-    else
-        AC_CHECK_FUNCS(sigwait)
-    fi
+	if test "$ac_cv_libc_sigwait" = "yes" ; then
+		AC_DEFINE(HAVE_SIGWAIT, [1], [have sigwait])
+	else
+		AC_CHECK_FUNCS(sigwait)
+	fi
 fi
 
 AC_LANG_CPLUSPLUS
@@ -164,6 +166,7 @@
 AC_SUBST(plugindir)
 AC_SUBST(UCOMMON_CFLAGS)
 AC_SUBST(UCOMMON_LIBS)
+AC_SUBST(UCOMMON_SECURE)
 AC_SUBST(UCOMMON_REQUIRES)
 AC_SUBST(UCOMMON_MODEL)
 AC_SUBST(CXXFLAGS)