From c14ecfe452046c00ffe83171ec7f9b64ff374795 Mon Sep 17 00:00:00 2001 From: Alan Brault Date: Mon, 2 May 2011 18:47:10 -0400 Subject: Make strcasestr() and strchrnul() into separate compat files Force everyone to use compat functions not just Solaris Remove libsysfs from buildconf Add libtool support (needed for libdusercompat.a) --- configure.in | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 9705e98..212f199 100644 --- a/configure.in +++ b/configure.in @@ -14,6 +14,14 @@ AC_CONFIG_SRCDIR([src/duser.c]) AC_PROG_CC AM_PROG_CC_C_O AC_PROG_INSTALL +AC_PROG_MAKE_SET +AC_PROG_RANLIB + +# Initializing libtool. +AC_DISABLE_SHARED +AC_PROG_LIBTOOL +AC_SUBST(LIBTOOL_DEPS) +LIBTOOL="$LIBTOOL --silent" # Checks for libraries. @@ -27,20 +35,13 @@ AC_TYPE_SIZE_T AC_FUNC_MALLOC AC_CHECK_FUNCS_ONCE([memset strcasecmp strdup strerror strncasecmp strstr strchrnul strcasestr]) -# Checks for currently used operating system. +# Detect if the host operating system is SunOS/Solaris as it behaves slightly different +# than GNU/Linux case "$host_os" in - *linux*) - CFLAGS="-O2 -Wall -Wextra -I../include" - AC_DEFINE([__NLINUX__], 1, [host operating system is linux]) - ;; - *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]) + *sunos*|solaris*) + AC_DEFINE([HAVE_SOLARIS], 1, [host operating system is solaris]) ;; *) - AC_MSG_ERROR([duser does not currently support your platform]) - ;; esac # Figure out where everything goes in the filesystem @@ -52,4 +53,9 @@ AC_SUBST(CONFIGDIR) AC_DEFINE_UNQUOTED([CFG_PATH], "$CFGPATH", [duser configuration path]) -AC_OUTPUT([Makefile src/Makefile]) +# Compiler Warnings Options +AC_ARG_ENABLE(warnings, +AC_HELP_STRING([--enable-warnings],[Enable all sorts of warnings for debugging.]), +[CFLAGS="$CFLAGS -Wcast-qual -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wredundant-decls -Wshadow -Wwrite-strings -W -Wno-unused"],[]) + +AC_OUTPUT([Makefile compat/Makefile src/Makefile]) -- cgit