Release 2.3.3.1.
[mLib] / configure.ac
index 52db7c7..ab8d2a8 100644 (file)
@@ -5,7 +5,7 @@ dnl
 dnl (c) 2008 Straylight/Edgeware
 dnl
 
-dnl ----- Licensing notice --------------------------------------------------
+dnl----- Licensing notice ---------------------------------------------------
 dnl
 dnl This file is part of the mLib utilities library.
 dnl
@@ -28,10 +28,11 @@ dnl--------------------------------------------------------------------------
 dnl Initialization.
 
 mdw_AUTO_VERSION
-AC_INIT([mLib], AUTO_VERSION, [mdw@distorted.org.uk])
+AC_INIT([mLib], AUTO_VERSION, [mdw@distorted.org.uk], [mLib])
 AC_CONFIG_SRCDIR([mLib.pc.in])
 AC_CONFIG_AUX_DIR([config])
-AM_INIT_AUTOMAKE([foreign])
+AM_INIT_AUTOMAKE([foreign subdir-objects])
+mdw_SILENT_RULES
 
 AC_PROG_CC
 AM_PROG_CC_C_O
@@ -39,6 +40,8 @@ AM_PROG_LIBTOOL
 AX_CFLAGS_WARN_ALL
 mdw_LIBTOOL_VERSION_INFO
 
+AC_CHECK_PROGS([AUTOM4TE], [autom4te])
+
 mdw_MANEXT
 
 AC_DEFINE_UNQUOTED([SRCDIR], ["$(cd $srcdir && pwd)"],
@@ -47,12 +50,28 @@ AC_DEFINE_UNQUOTED([SRCDIR], ["$(cd $srcdir && pwd)"],
 dnl--------------------------------------------------------------------------
 dnl C programming environment.
 
+MLIB_LIBS=
+
 dnl Headers.
 AC_CHECK_HEADERS([float.h])
+AC_CHECK_HEADERS([stdint.h])
 
 dnl Libraries.
+mdw_ORIG_LIBS=$LIBS LIBS=$MLIB_LIBS
 AC_SEARCH_LIBS([socket], [socket])
 AC_SEARCH_LIBS([gethostbyname], [nsl resolv])
+MLIB_LIBS=$LIBS LIBS=$mdw_ORIG_LIBS
+
+dnl Functions.
+AC_CHECK_FUNCS([snprintf])
+
+dnl Types.
+AC_CHECK_TYPE([socklen_t], [],
+  [AC_DEFINE([socklen_t], [int],
+     [Define to `int' if <sys/socket.h> does not define])],
+  [AC_INCLUDES_DEFAULT
+#include <sys/socket.h>
+])
 
 dnl Which version of struct msghdr do we have?
 AC_CHECK_MEMBERS([struct msgdr.msg_control],,, [
@@ -60,6 +79,12 @@ AC_CHECK_MEMBERS([struct msgdr.msg_control],,, [
 #include <sys/socket.h>
 ])
 
+dnl Find out whether we're cross-compiling.
+AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
+
+dnl Set the master library list.
+AC_SUBST([MLIB_LIBS])
+
 dnl--------------------------------------------------------------------------
 dnl Name resolution.
 
@@ -69,10 +94,12 @@ AC_ARG_WITH([adns],
   [want_adns=$withval],
   [want_adns=auto])
 
+mdw_ORIG_LIBS=$LIBS LIBS=$MLIB_LIBS
 case $want_adns in
   no) ;;
   *) AC_SEARCH_LIBS([adns_init], [adns], [have_adns=yes], [have_adns=no]) ;;
 esac
+MLIB_LIBS=$LIBS LIBS=$mdw_ORIG_LIBS
 case $want_adns,$have_adns in
   yes,no)
     AC_MSG_ERROR([ADNS library not found but explicitly requested])
@@ -94,13 +121,30 @@ esac
 AM_CONDITIONAL([WITH_ADNS], [test "$use_adns" = yes])
 
 dnl--------------------------------------------------------------------------
+dnl Python (used for testing).
+
+AM_PATH_PYTHON([2.4],, [:])
+
+dnl--------------------------------------------------------------------------
 dnl Output.
 
 AC_CONFIG_HEADER([config/config.h])
+AC_CONFIG_TESTDIR([t])
 
 AC_CONFIG_FILES(
   [Makefile]
-  [man/Makefile])
+  [buf/Makefile]
+  [codec/Makefile]
+  [hash/Makefile]
+  [mem/Makefile]
+  [sel/Makefile]
+  [struct/Makefile]
+  [sys/Makefile]
+  [test/Makefile]
+  [trace/Makefile]
+  [ui/Makefile]
+  [utils/Makefile]
+  [t/Makefile t/atlocal])
 AC_OUTPUT
 
-dnl ----- That's all, folks -------------------------------------------------
+dnl------ That's all, folks -------------------------------------------------