aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorAlan Brault <alan.brault@incruentatus.net>2011-05-02 16:35:59 -0400
committerAlan Brault <alan.brault@incruentatus.net>2011-05-02 16:35:59 -0400
commit100570c7f91d3bfe8f90536f96c8154c78641b1d (patch)
treebb2aebbbe0da1de1dd6d860a57e1cd9f8b961419 /configure.in
parent36ce621c0cb28d58913f2d1a84f5125f4a9db285 (diff)
downloadduser-100570c7f91d3bfe8f90536f96c8154c78641b1d.tar.gz
Add configure checks for strchrnul() and strcasestr() and config.h entries
Add __NLINUX__ and __NSOLARIS__ platform checks to configure and config.h entries
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in13
1 files changed, 8 insertions, 5 deletions
diff --git a/configure.in b/configure.in
index 7a97a17..9705e98 100644
--- a/configure.in
+++ b/configure.in
@@ -7,7 +7,7 @@ AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(1.11.1)
-AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_HEADERS([include/config.h])
AC_CONFIG_SRCDIR([src/duser.c])
# Checks for programs.
@@ -25,18 +25,21 @@ AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
-AC_CHECK_FUNCS_ONCE([memset strcasecmp strdup strerror strncasecmp strstr])
+AC_CHECK_FUNCS_ONCE([memset strcasecmp strdup strerror strncasecmp strstr strchrnul strcasestr])
# Checks for currently used operating system.
case "$host_os" in
*linux*)
CFLAGS="-O2 -Wall -Wextra -I../include"
+ AC_DEFINE([__NLINUX__], 1, [host operating system is linux])
;;
- *solaris*)
- CFLAGS="-O2 -Wall -D_NLINUX_ -I../include"
+ *solaris*)
+ # The STSCI Build of GNU GCC has a broken -Wextra handler
+ CFLAGS="-O2 -Wall -I../include"
+ AC_DEFINE([__NSOLARIS__], 1, [host operating system is solaris])
;;
*)
- CFLAGS="-O2 -Wall -Wextra -I../include"
+ AC_MSG_ERROR([duser does not currently support your platform])
;;
esac