summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2010-02-03 14:12:28 -0500
committerGaetan Nadon <memsize@videotron.ca>2010-02-05 10:16:06 -0500
commit8808c476319fce3e254e3a7df3205ba4205cb13b (patch)
tree1e9c36d640fb31128b9f9aa59dbc49f80e859a87 /configure.ac
parent9792646873ac0e597cc65ef4a056444fd8f9a7fd (diff)
Add AC_USE_SYSTEM_EXTENSIONS providing needed WTMPX_FILE define
The WTMPX_FILE is only defined under __USE_GNU conditional compilation. Autoconf provides AC_USE_SYSTEM_EXTENSIONS to enable platform extensions. It must be expanded before any other macros that uses the compiler. To reduce the risk of being misplaced, the statements have been grouped (mostly) as per the GNU standard layout.This macro requires Autoconf level 2.60 or later. The compilation failed under a GNU-Linux OS. Tested-by (on darwin): Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac32
1 files changed, 19 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index be1b4b4..464cff4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,25 +20,34 @@ dnl PERFORMANCE OF THIS SOFTWARE.
dnl
dnl Process this file with autoconf to create configure.
-AC_PREREQ([2.57])
+# Initialize Autoconf
+AC_PREREQ([2.60])
AC_INIT(sessreg, [1.0.5],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
sessreg)
+AC_CONFIG_SRCDIR([Makefile.am])
+AC_CONFIG_HEADERS([config.h])
+AC_CANONICAL_HOST
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
+
+# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
-AM_CONFIG_HEADER(config.h)
-
-# Require xorg-macros 1.3 or later: XORG_DEFAULT_OPTIONS
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
m4_ifndef([XORG_MACROS_VERSION],
- [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.3)
+ [m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.4)
+XORG_DEFAULT_OPTIONS
+XORG_WITH_LINT
+# Checks for programs.
AC_PROG_CC
+AC_PROG_CC_C99
AC_PROG_INSTALL
-XORG_DEFAULT_OPTIONS
-
+# Checks for header files.
AC_CHECK_HEADERS([lastlog.h utmp.h utmpx.h sys/param.h])
AC_CHECK_MEMBER([struct utmpx.ut_syslen],
HAVE_SYSLEN=1,
@@ -46,15 +55,12 @@ AC_CHECK_MEMBER([struct utmpx.ut_syslen],
[#include <utmpx.h>])
AC_DEFINE_UNQUOTED(HAVE_UTMPX_UT_SYSLEN,$HAVE_SYSLEN,
[utmpx structure includes ut_syslen field])
-AC_CHECK_FUNCS([updwtmpx utmpxname])
-AC_SYS_LARGEFILE
+# Checks for typedefs, structures, and compiler characteristics.
+AC_CHECK_FUNCS([updwtmpx utmpxname])
# Checks for pkg-config packages
PKG_CHECK_MODULES(SESSREG, xproto)
AC_SUBST(SESSREG_CFLAGS)
-# Allow checking code with lint, sparse, etc.
-XORG_WITH_LINT
-
AC_OUTPUT([Makefile])