diff options
author | Gaetan Nadon <memsize@videotron.ca> | 2011-01-19 11:20:21 -0500 |
---|---|---|
committer | Gaetan Nadon <memsize@videotron.ca> | 2011-01-21 08:22:23 -0500 |
commit | 5a886e2fc5f4b3f062a20f66ee68bad4a0b98ad1 (patch) | |
tree | 0da928efbc186224a72bbd8c71cc3bfddd79d088 | |
parent | 4eaaa6a84a52b7c60df964102f0fb8d860b00308 (diff) |
config: use AC_CHECK_MEMBERS rather than AC_CHECK_MEMBER
Let Autoconf do the work of setting up the #define in config.h.
Apply and comment standard sections layout.
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | sessreg.c | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index f3c9f4e..c7e5e90 100644 --- a/configure.ac +++ b/configure.ac @@ -42,17 +42,14 @@ XORG_WITH_LINT # 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, - HAVE_SYSLEN=0, - [#include <utmpx.h>]) -AC_DEFINE_UNQUOTED(HAVE_UTMPX_UT_SYSLEN,$HAVE_SYSLEN, - [utmpx structure includes ut_syslen field]) # Checks for typedefs, structures, and compiler characteristics. +AC_CHECK_MEMBERS([struct utmpx.ut_syslen], [], [], [#include <utmpx.h>]) + +# Checks for library functions. AC_CHECK_FUNCS([updwtmpx utmpxname]) -# Checks for pkg-config packages +# Obtain compiler/linker options for depedencies PKG_CHECK_MODULES(SESSREG, xproto) AC_CONFIG_FILES([ @@ -477,7 +477,7 @@ set_utmpx (struct utmpx *u, const char *line, const char *user, (void) strncpy (u->ut_line, line, sizeof (u->ut_line)); strncpy(u->ut_host, line, sizeof(u->ut_host)); -#if HAVE_UTMPX_UT_SYSLEN +#ifdef HAVE_STRUCT_UTMPX_UT_SYSLEN u->ut_syslen = strlen(line); #endif } |