summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriele Svelto <gabriele.svelto@gmail.com>2012-04-26 09:17:23 +0200
committerMartin Sustrik <sustrik@250bpm.com>2012-04-27 10:41:10 +0200
commit5b468252036fdbadfab00df743c35a415fbb2adb (patch)
tree835ad625e5ff23dd6bbcd20d2bba4fb66e9a18fe
parent2602a776e520ff12769cac152559b0bf33d5f70f (diff)
Replaced obsolete autoconf and automake macros
This patch cleans up a number of obsolete constructs in the build system, these include: - Replacing AC_TRY_RUN with AC_RUN_IFELSE for the SOCK_CLOEXEC test - Using AC_CONFIG_HEADERS instead of AM_CONFIG_HEADER - Using LT_INIT with the win32-dll parameter instead of the obsolete AC_PROG_LIBTOOL and AC_LIBTOOL_WIN32_DLL macros - Removing the unused and obsolete AC_TYPE_SIGNAL check - Removing the unused alloca.h header check - Replacing the deprecated INCLUDES macro with AM_CPPFLAGS Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
-rw-r--r--acinclude.m424
-rw-r--r--configure.ac8
-rw-r--r--perf/Makefile.am4
-rw-r--r--tests/Makefile.am4
4 files changed, 19 insertions, 21 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index e1429e5..51a3d5c 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -581,13 +581,15 @@ AC_DEFUN([LIBXS_CHECK_LANG_VISIBILITY], [{
[AC_MSG_RESULT(yes) ; $1], [AC_MSG_RESULT(no) ; $2])
}])
-dnl ################################################################################
-dnl # LIBXS_CHECK_SOCK_CLOEXEC([action-if-found], [action-if-not-found]) #
-dnl # Check if SOCK_CLOEXEC is supported #
-dnl ################################################################################
-AC_DEFUN([LIBXS_CHECK_SOCK_CLOEXEC], [{
- AC_MSG_CHECKING(whether SOCK_CLOEXEC is supported)
- AC_TRY_RUN([/* SOCK_CLOEXEC test */
+###############################################################################
+# LIBXS_CHECK_SOCK_CLOEXEC([action-if-found], [action-if-not-found]) #
+# Check if SOCK_CLOEXEC is supported #
+###############################################################################
+
+AC_DEFUN([LIBXS_CHECK_SOCK_CLOEXEC], [
+ AC_MSG_CHECKING([whether SOCK_CLOEXEC is supported])
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+/* SOCK_CLOEXEC test */
#include <sys/types.h>
#include <sys/socket.h>
@@ -595,13 +597,11 @@ int main (int argc, char *argv [])
{
int s = socket (PF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0);
return (s == -1);
-}
- ],
+} ]])],
[AC_MSG_RESULT(yes) ; libxs_cv_sock_cloexec="yes" ; $1],
[AC_MSG_RESULT(no) ; libxs_cv_sock_cloexec="no" ; $2],
- [AC_MSG_RESULT(not during cross-compile) ; libxs_cv_sock_cloexec="no"]
- )
-}])
+ [AC_MSG_RESULT(not during cross-compile) ; libxs_cv_sock_cloexec="no"])
+])
###############################################################################
# LIBXS_CHECK_KQUEUE #
diff --git a/configure.ac b/configure.ac
index b602df5..decbd6c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,7 +11,7 @@ AC_INIT([libxs], [m4_esyscmd([./version.sh])],
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([m4])
-AM_CONFIG_HEADER([src/platform.hpp])
+AC_CONFIG_HEADERS([src/platform.hpp])
AM_INIT_AUTOMAKE([tar-ustar dist-zip foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -56,8 +56,7 @@ AC_PATH_PROG([XMLTO], [xmlto])
AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
AC_PATH_PROG([ASCIIDOC], [asciidoc])
LIBXS_CONFIG_LIBTOOL
-AC_LIBTOOL_WIN32_DLL
-AC_PROG_LIBTOOL
+LT_INIT([win32-dll])
# Check whether to build a with debug symbols
LIBXS_CHECK_ENABLE_DEBUG
@@ -459,7 +458,6 @@ AM_CONDITIONAL([BUILD_PGM], [test "x$libxs_pgm_ext" = "xyes"])
AM_CONDITIONAL([ON_MINGW], [test "x$libxs_on_mingw32" = "xyes"])
# Checks for library functions.
-AC_TYPE_SIGNAL
AC_CHECK_FUNCS([ \
perror \
gettimeofday \
@@ -469,7 +467,7 @@ AC_CHECK_FUNCS([ \
getifaddrs \
freeifaddrs
])
-AC_CHECK_HEADERS([alloca.h])
+
LIBXS_CHECK_SOCK_CLOEXEC([
AC_DEFINE([XS_HAVE_SOCK_CLOEXEC], [1],
[Whether SOCK_CLOEXEC is defined and functioning.])
diff --git a/perf/Makefile.am b/perf/Makefile.am
index 3a4f629..3705488 100644
--- a/perf/Makefile.am
+++ b/perf/Makefile.am
@@ -1,5 +1,5 @@
-INCLUDES = -I$(top_builddir)/include \
- -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_builddir)/include \
+ -I$(top_srcdir)/include
noinst_PROGRAMS = local_lat remote_lat local_thr remote_thr inproc_lat inproc_thr
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 47a880b..4e08ae7 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,5 +1,5 @@
-INCLUDES = -I$(top_builddir)/include \
- -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_builddir)/include \
+ -I$(top_srcdir)/include
LDADD = $(top_builddir)/src/libxs.la