Import Upstream version 0.66.4
[hcoop/debian/courier-authlib.git] / configure.ac
index 4e46866..54dbbc6 100644 (file)
@@ -1,16 +1,16 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl
 dnl
-dnl Copyright 1998 - 2013 Double Precision, Inc.  See COPYING for
+dnl Copyright 1998 - 2015 Double Precision, Inc.  See COPYING for
 dnl distribution information.
 
 AC_PREREQ(2.63)
-AC_INIT([courier-authlib],[0.66.1],[courier-users@lists.sourceforge.net])
+AC_INIT([courier-authlib],[0.66.4],[courier-users@lists.sourceforge.net])
 
 AC_CONFIG_SRCDIR([courierauth.h])
 
 AM_INIT_AUTOMAKE
-AM_CONFIG_HEADER([courier_auth_config.h])
+AC_CONFIG_HEADERS([courier_auth_config.h])
 >confdefs.h  # Kill PACKAGE_ macros
 
 LPATH="$PATH:/usr/local/bin"
@@ -123,6 +123,16 @@ fi
 LIBS="$saveLIBS"
 AC_SUBST(NETLIBS)
 
+save_LIBS="$LIBS"
+LIBS="-lcourier-unicode"
+AC_LINK_IFELSE(
+[AC_LANG_PROGRAM([
+#include <courier-unicode.h>
+],[
+       unicode_default_chset();
+])],[:],[AC_MSG_ERROR([The Courier Unicode Library 1.2 appears not to be installed. You may need to install a separate development subpackage, in addition to the main package])])
+LIBS="$save_LIBS"
+
 dnl #########################################################################
 
 dnl Prepare authuserdb module if userdb library is available
@@ -615,7 +625,7 @@ AC_ARG_WITH(authsqlite,
 
 AC_ARG_WITH(sqlite-libs,
 [ --with-sqlite-libs=DIR               Look for sqlite libs in this dir ],
-        
+
        SQLITE_LIBS="-lsqlite3"
 )
 AC_ARG_WITH(sqlite-includes,
@@ -909,12 +919,12 @@ AC_ARG_WITH(stdheaderdir,
 
 AC_CACHE_CHECK([for socklen_t],
        authlib_cv_hassocklen_t,
+
 AC_COMPILE_IFELSE([
 AC_LANG_SOURCE( [
 #include <sys/types.h>
 #include <sys/socket.h>
+
 socklen_t sl_t;
 ],[
        accept(0, 0, &sl_t);
@@ -922,9 +932,9 @@ socklen_t sl_t;
        authlib_cv_hassocklen_t=yes,
        authlib_cv_hassocklen_t=no)
 )
+
 socklen_t="int"
+
 if test $authlib_cv_hassocklen_t = yes
 then
        :
@@ -936,8 +946,19 @@ AC_ARG_WITH(repository, [], REPOSITORY="$withval")
 AC_SUBST(REPOSITORY)
 
 AM_CONDITIONAL(HAVE_SGML, test -d ${srcdir}/libs/docbook)
-AC_CONFIG_SUBDIRS(libs/bdbobj libs/gdbmobj libs/md5 libs/sha1 libs/libhmac libs/numlib libs/makedat userdb libs/unicode libs/rfc822 libs/random128 libs/liblock liblog)
+
+# This gets built by the make rule, and is not in the git repo
+
+for f in authdaemonrc.in
+do
+    if test ! -f "$srcdir/$f"
+    then
+       cp -p "$srcdir/$f.git" "$srcdir/$f"
+       touch "$srcdir/$f.git"
+    fi
+done
+
+AC_CONFIG_SUBDIRS(libs/bdbobj libs/gdbmobj libs/md5 libs/sha1 libs/libhmac libs/numlib libs/makedat userdb libs/rfc822 libs/random128 libs/liblock liblog)
 
 AC_CONFIG_FILES(Makefile authdaemond authdaemonrc authsystem.passwd README.authdebug.html dbobj.config dbobj.h authmigrate courier-authlib.spec courier-authlib.lpspec courier-authlib.sysvinit courier-authlib.service userdb-test-cram-md5.pl)
 AC_OUTPUT
-